Repository navigation
Library: String
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 designed with backward compatibility in mind; your existing code is expected to function as intended. Nonetheless, we recommend transitioning to newer syntax.
✨ Verifies whether the string is void.
local bool: result = string.isVoid(
string: baseString
)✨ Parses and returns possible values of the string.
local ~: result = string.parse(
string: baseString
)✨ Parses and returns possible color values of the hex.
local float: r, float: g, float: b = string.parseHex(
string: baseString
)✨ Formats milliseconds into hours:minutes:seconds time format.
local string: result = string.formatTime(
number: milliseconds
)✨ Encodes the data using specified options.
ℹ️ For
typeandoptionsrefer
local string: result = string.encode(
string: baseString,
string: type,
table: options
)✨ Decodes the encoded data using specified options.
ℹ️ For
typeandoptionsrefer
local string: result = string.decode(
string: baseString,
string: type,
table: options
)✨ Splits the data using specified separator.
local table: result = string.split(
string: baseString
string: separator
)✨ Kerns the data using specified kerner.
local string: result = string.kern(
string: baseString
string: kerner --(Optional) By default it use " " as kerner if left unspecified
)✨ Converts specified string's tabs to spaces.
local string: result = string.detab(
string: baseString
)✨ Minifies the specified data.
local string: result = string.minify(
string: baseString
)