utf8.width | Multi Theft Auto: Wiki Skip to content

utf8.width

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.


Calculates the width of UTF-8 strings with special/unprintable characters, which require special width treatment.

Syntax

utf8.width ( )

Code Examples

server

This example shows the difference whenambi_is_doubleis set tofalseortrue.

local input = "днём"
local disabled = utf8.width( input, false )
local enabled = utf8.width( input, true )
print( disabled, enabled ) -- 4, 8

See Also