Type Function Library string.* Return value Number Revision 2017.3060 Keywords string, len, length, string length See also String
Returns the length of a string (amount of characters).
If you're using encoded UTF-8 characters, for example Russian or Arabic characters, some of these characters are string.len()
. Please see here for more information on
print( string.len( "Lua" ) ) --> 3 print( string.len( "" ) ) --> 0 print( string.len( "Lua\000user" ) ) --> 8