-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: String
Tron edited this page Jan 13, 2023
·
1 revision
Lua provides built in string
module by default, however its deprived of utf8
support. utf8 is essential especially when trying to work w/ non ASCII characters such as 'cyrillic' etc. This module extends existing string
module while adding utf8
support without breaking backwards compatibility!
It gets imported automatically by default whenever you initialize assetify
.
--Declare it 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 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
)