Repository navigation
Library: String
ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Dec 5, 2024
·
15 revisions
The Lua standard library's string module lacks comprehensive UTF-8 support, which is crucial for handling non-ASCII characters like Cyrillic text. This module extends the existing string module with UTF-8 support while maintaining backward compatibility.
It's already imported by default whenever you import assetify. You need to declare the below globally only once:
loadstring(exports.assetify_library:import())()Our extensions are written with backwards compatibility in mind; Expect your previous code to work as usual! However we recommend upgrading to newer syntax.
local bool: result = string.isVoid(
string: baseString
)local ~: result = string.parse(
string: baseString
)local float: r, float: g, float: b = string.parseHex(
string: baseString
)local string: result = string.formatTime(
number: milliseconds
)ℹ️ For
typeandoptionsrefer
local string: result = string.encode(
string: baseString,
string: type,
table: options
)ℹ️ For
typeandoptionsrefer
local string: result = string.decode(
string: baseString,
string: type,
table: options
)local table: result = string.split(
string: baseString
string: separator
)local string: result = string.kern(
string: baseString
string: kerner --(Optional) By default it use " " as kerner if left unspecified
)local string: result = string.detab(
string: baseString
)local string: result = string.minify(
string: baseString
)