utf8.widthindex
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.
Returns the location, offset and width of the character at the given location in the UTF-8 string.
Syntax
utf8.widthindex ( )Code Examples
server
This example
local input = "днём"local raw_width = utf8.width( input, true )
for location = 1, raw_width do print( utf8.widthindex( input, location, true ) )end