Engine

string

Show Deprecated

The string library provides generic functions to manipulate strings, such as to extract substrings or match patterns. You can access the string library by the global string library.

See String Pattern Reference for details on using string.match() and string.gmatch() to find a piece, or substring, of a longer string.

Summary

Functions

Functions

byte

Parameters

Default Value: 1
Default Value: i

Returns

char

Parameters

...: number

Returns

find

Parameters

pattern: string
init: number
Default Value: 1
plain: bool
Default Value: false

format

Parameters

formatstring: string
...: string

Returns

gmatch

Parameters

pattern: string

Returns

gsub

Parameters

pattern: string
replacement: Variant
replacements: number

Parameters

Returns

lower

Parameters

Returns

match

Parameters

pattern: string
init: number
Default Value: 1

Returns

pack

Parameters

format: string
...: Variant

Returns

packsize

Parameters

format: string

Returns

Parameters

Returns

reverse

Parameters

Returns

split

Parameters

separator: string
Default Value: ,

Returns

Parameters

Default Value: 1
Default Value: -1

Returns

unpack

Parameters

format: string
data: string
readStart: string
Default Value: 1

Returns

upper

Parameters

Returns