utf8.next
Client-side
Server-side
Shared
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This is an iteration function to traverse each single codepoint of a UTF-8 string.
Syntax
utf8.next ( )Code Examples
server
This example shows how to traverse a UTF-8 string the proper way without running into problems as in byte strings.
for position, codepoint in utf8.next, "utf8-string" do print( "Codepoint @ ".. position .." = ".. codepoint )end
for position, codepoint in utf8.next, "Как" do print( "Codepoint @ ".. position .." = ".. codepoint )end