string module

Core framework Console Desktop

The string module provides powerful functions for string manipulation

Functions Description Return value
string.capitalize() Capitalize an UTF8 string string
string.byte() Gets the bytes of a string numbers
string.ubyte() Gets the bytes of an UTF8 string numbers
string.char() Get a string from successive bytes string
string.uchar() Get an UTF8 string from successive bytes string
string.dump() Get the bytecode of a function string
string.find() Search for the first pattern in a string number
string.ufind() Search for the first pattern in an UFT8 string number
string.format() Format an UTF8 string with multiple values string
string.gmatch() Get a pattern matching iterator function
string.gumatch() Get an UTF8 pattern matching iterator function
string.gsub() Get a new string after a global pattern substitution string
string.gusub() Get a new UTF8 string after a global pattern substitution string
string.len() Get the string length in bytes number
string.match() Get a match from a pattern string nil
string.umatch() Get an UTF8 string match from a pattern string nil
string.pack() Serialize values to a string string
string.packsize() Get the size of a serialized string number
string.rep() Concatenate an UTF8 string multiple times string
string.reverse() Get a new reversed string string
string.ureverse() Get a new reversed UTF8 string string
string.sub() Get a substring string
string.usub() Get a substring in a UTF8 string string
string.unpack() Get values from a serialized string ...
string.lower() Convert an UTF8 string to lowercase string
string.normalize() Removes diacratics from a string string
string.similarity() Compute UTF8 string similarity using Levenshtein distance algorithm number
string.split() Split an UTF8 string into substrings table
string.ulen() Get an UTF8 string length in characters number
string.upper() Convert an UTF8 string to uppercase string
string.usearch() Fast UTF8 string search without patterns number
Operation Description
string iteration Iterate over an UTF8 string, character by character
string length operator Get the size of the string in bytes