From Multi Theft Auto: Wiki
Revision as of 13:12, 30 April 2021 by Toliak (talk | contribs) (Split syntax into different boxes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

[[{{{image}}}|link=|]] Note: You may want to read up on case folding for more information about the use of this function.

Converts a UTF-8 string to folded case (lowercase), which can be used to compare two strings. If input is an integer, it's treat as a codepoint and a convert codepoint (integer) is returned.


string|int utf8.fold ( string|int input )
string|int utf8.lower ( string|int input )

Required Arguments

  • input: A string character sequence OR an integer value


Returns a string in lowercase OR returns an integer (see description).


Click to collapse [-]

This example shows how to convert a string to lowercase, which can be used to compare with other folded strings.

local output = utf8.lower( "WHAT ARE YOU UP TO? Do you like uppercase?" )
print( output ) -- what are you up to? do you like uppercase?

local value = utf8.fold( 1088 )
print( type( value ) ) -- number

See Also