string
string.ubyte
function string.ubyte(s: string, i?: integer, j?: integer)
-> integer
2. ...unknown
UTF-8 equivalent of string.byte
string.uchar
function string.uchar(byte: integer, ...integer)
-> string
2. ...unknown
UTF-8 equivalent of string.char
string.ucharpos
function string.ucharpos(s: string, charpos?: integer, index?: integer)
-> charpos: integer
2. codepoint: integer
Equivalent to utf8extra.charpos()
string.uclean
function string.uclean(s: string, replacement_string?: string, non_consecutive?: boolean)
-> cleaned_string: string
2. was_valid: boolean
Equivalent to utf8extra.clean()
string.ucodepoint
function string.ucodepoint(s: string, i?: integer, j?: integer, lax?: boolean)
-> code: integer
2. ...unknown
Equivalent to utf8.codepoint()
@param lax
— Do not check if string is invalid utf8
string.ucodes
function string.ucodes(s: string, lax?: boolean)
-> fun():integer, integer
Equivalent to utf8.codes()
@param lax
— Do not check if string is invalid utf8
string.uescape
function string.uescape(s: string)
-> utf8_string: string
Equivalent to utf8extra.escape()
string.ufind
function string.ufind(s: string, pattern: string, init?: integer, plain?: boolean)
-> start: integer
2. end: integer
3. ...unknown
UTF-8 equivalent of string.find
@return start
@return end
@return ...
— captured
string.ufold
function string.ufold(s: string)
-> new_string: string
Equivalent to utf8extra.fold()
string.ugmatch
function string.ugmatch(s: string, pattern: string, init?: integer)
-> fun():string, ...unknown
UTF-8 equivalent of string.gmatch
string.ugsub
function string.ugsub(s: string, pattern: string, repl: string|function|table, n: integer)
-> string
2. count: integer
UTF-8 equivalent of string.gsub
string.uinsert
function string.uinsert(s: string, idx?: integer, substring: string)
-> new_string: string
Equivalent to utf8extra.insert()
string.uinvalidoffset
function string.uinvalidoffset(s: string, init?: integer)
-> offset: integer
Equivalent to utf8extra.invalidoffset()
string.uisnfc
function string.uisnfc(s: string)
-> boolean
Equivalent to utf8extra.isnfc()
string.uisvalid
function string.uisvalid(s: string)
-> boolean
Equivalent to utf8extra.isvalid()
string.ulen
function string.ulen(s: string, i?: integer, j?: integer, lax?: boolean)
-> integer
UTF-8 equivalent of string.len
@param lax
— Do not check if string is invalid utf8
string.ulower
function string.ulower(s: string)
-> string
UTF-8 equivalent of string.lower
string.umatch
function string.umatch(s: string, pattern: string, init?: integer)
-> captured: string|number
UTF-8 equivalent of string.match
string.uncasecmp
function string.uncasecmp(a: string, b: string)
-> result: integer
Equivalent to utf8extra.ncasecmp()
string.unext
function string.unext(s: string, charpos?: integer, index?: integer)
-> charpos: integer
2. codepoint: integer
Equivalent to utf8extra.next()
string.unormalize_nfc
function string.unormalize_nfc(s: string)
-> normal_string: string
2. was_n: boolean
Equivalent to utf8extra.normalize_nfc()
string.uoffset
function string.uoffset(s: string, n: integer, i?: integer)
-> position_in_bytes: integer
Equivalent to utf8.offset()
string.uremove
function string.uremove(s: string, start?: integer, stop?: integer)
-> new_string: string
Equivalent to utf8extra.remove()
string.ureverse
function string.ureverse(s: string, lax?: boolean)
-> string
UTF-8 equivalent of string.reverse
@param lax
— Do not check if string is invalid utf8
string.usub
function string.usub(s: string, i: integer, j?: integer)
-> string
UTF-8 equivalent of string.sub
string.utitle
function string.utitle(s: string)
-> new_string: string
Equivalent to utf8extra.title()
string.uupper
function string.uupper(s: string)
-> string
UTF-8 equivalent of string.upper
string.uwidth
function string.uwidth(s: string, ambi_is_double?: boolean, default_width?: integer)
-> width: integer
Equivalent to utf8extra.width()
string.uwidthindex
function string.uwidthindex(s: string, location: integer, ambi_is_double?: boolean, default_width?: integer)
-> idx: integer
2. offset: integer
3. width: integer
Equivalent to utf8extra.widthindex()