Sandbox: Lua: String - ov-studio/Vital.sandbox GitHub Wiki
» Overview
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.
» APIs
ℹ️ 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.
-
string.isVoid() - shared
✨ Verifies whether the string is void.
local bool: result = string.isVoid( string: baseString )
-
string.parse() - shared
✨ Parses and returns possible values of the string.
local ~: result = string.parse( string: baseString )
-
string.parseHex() - shared
✨ Parses and returns possible color values of the hex.
local float: r, float: g, float: b = string.parseHex( string: baseString )
-
string.formatTime() - shared
✨ Formats milliseconds into
hours:minutes:seconds
time format.local string: result = string.formatTime( number: milliseconds )
-
string.split() - shared
✨ Splits the data using specified separator.
local table: result = string.split( string: baseString string: separator )
-
string.kern() - shared
✨ 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 )
-
string.detab() - shared
✨ Converts specified string's tabs to spaces.
local string: result = string.detab( string: baseString )
-
string.minify() - shared
✨ Minifies the specified data.
local string: result = string.minify( string: baseString )