string

# Functions

[{"index":"string upper()","0":"Converts the string to uppercase and returns it."}]

[{"index":"string lower()","0":"Converts the string to lowercase and returns it."}]

[{"index":"string, integer gsub(string pattern, any repl, integer n)","0":"Returns a string in which every instance of pattern has been replaced with repl, and it determines the total number of substitutions. The n indicates the maximum number to replace. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"string, integer gsub(string pattern, any repl)","0":"Returns a string in which every instance of pattern has been replaced with repl, and it determines the total number of substitutions. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"integer, integer find(string pattern, integer init = 1, boolean plain = false)","0":"Finds the first matching location of the pattern in the string. Once it finds the matching part, returns the indexes of the start and end parts of the string. Otherwise, it returns nil. The start position can be defined with init. If you set plain to true, it does not check the pattern. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"string reverse()","0":"Returns a string by converting letters of the string to the opposite."}]

[{"index":"string format(any... args)","0":"Makes and returns a string with a specified format."}]

[{"index":"integer... byte(integer i = 1, integer j = i)","0":"Returns the number code of the string. Returns the number code list if the start index is defined as i and the end index as j. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"integer len()","0":"Returns the length of the string. The index and length are in bytes, but you need to be careful when using multiple languages because strings are variable-length encoding."}]

[{"index":"string rep(integer n, string sep = \"\")","0":"Returns a string that uses sep as the delimiter to concatenate n copies of the string."}]

[{"index":"func gmatch(string pattern)","0":"Returns the iterator function. Returns the next matching part of the pattern for the string on each call. The index and length are in bytes, but you need to be careful when using multiple languages because strings are variable-length encoding."}]

[{"index":"string match(string pattern, integer init = 1)","0":"Returns the first matching part of the pattern in the string. The position to begin searching is init."}]

[{"index":"string pack(any... args)","0":"Returns a binary string made according to the format string."}]

[{"index":"integer packsize()","0":"Returns the size of a string resulting from string.pack with the given format. 's,' a variable-length option to the format string. 'z' cannot be used."}]

[{"index":"string sub(integer i, integer j = -1)","0":"Returns a string from i to j."}]

[{"index":"any... unpack(string s, integer pos = 1)","0":"Returns the values packed in the string via string.pack according to the format string. The start index can be set through pos. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"integer compare(string s)","0":"Compares the two strings in alphabetical order. If the two strings are the same, it returns 0. If the first string is lower, it returns a number lower than 0. If the second string is lower, it returns a number bigger than 0."}]

[{"index":"boolean equals(string s)","0":"Checks whether two strings are the same."}]

[{"index":"string upper(string s) (Static)","0":"Converts and returns s to uppercase."}]

[{"index":"string lower(string s) (Static)","0":"Converts and returns s to lowercase."}]

[{"index":"string, integer gsub(string s, string pattern, any repl, integer n) (Static)","0":"Returns a string in which every instance of pattern in s has been replaced with repl, and it determines the total number of substitutions. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"string, integer gsub(string s, string pattern, any repl) (Static)","0":"Returns a string in which every instance of pattern in s has been replaced with repl, and it determines the total number of substitutions. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"integer, integer find(string s, string pattern, integer init = 1, boolean plain = false) (Static)","0":"Looks for the first match position of the pattern in s. When it discovers a match, it returns the indices of the start and end part of s. If it doesn't, it returns nil. The start position can be defined with init. If you set plain to true, it does not check the pattern. While the index and length are in bytes, the string is variable-length encoded, so be aware of this when using multiple languages."}]

[{"index":"string reverse(string s) (Static)","0":"Returns a string that is s reversed."}]

[{"index":"string format(string fmt, any... args) (Static)","0":"Makes and returns a string with a specified format."}]

[{"index":"string char(integer... args) (Static)","0":"Generates the string that expresses the numerical code which was delivered as an argument."}]

[{"index":"integer... byte(string s, integer i = 1, integer j = i) (Static)","0":"Returns the numerical codes of s. Returns the numerical code list when the start index is specified in i and the end index is specified in j. While the index and length are in bytes, the string is variable-length encoded, so be aware of this when using multiple languages."}]

[{"index":"integer len(string s) (Static)","0":"Returns the length of the delivered string. While the index and length are in bytes, the string is variable-length encoded, so be aware of this when using multiple languages."}]

[{"index":"string rep(string s, integer n, string sep = \"\") (Static)","0":"Returns a string that uses sep as the delimiter to concatenate n copies of s."}]

[{"index":"func gmatch(string s, string pattern) (Static)","0":"Returns the iterator function. Each time it is called, returns the next match of the pattern of s. While the index and length are in bytes, the string is variable-length encoded, so be aware of this when using multiple languages."}]

[{"index":"string match(string s, string pattern, integer init = 1) (Static)","0":"Returns the first match of the pattern in s. The position to begin searching is init."}]

[{"index":"string pack(string fmt, any... args) (Static)","0":"Returns a binary string made according to the format string."}]

[{"index":"integer packsize(string fmt) (Static)","0":"Returns the size of a string resulting from string.pack with the given format. 's,' a variable-length option to the format string. 'z' cannot be used."}]

[{"index":"string sub(string s, integer i, integer j = -1) (Static)","0":"Returns a string from i to j."}]

[{"index":"any... unpack(string fmt, string s, integer pos = 1) (Static)","0":"Returns the values packed in the string via string.pack according to the format string. The start index can be set through pos. The index and length are in bytes, but you need to be careful when using multiple languages because strings use variable-length encoding."}]

[{"index":"integer compare(string s1, string s2) (Static)","0":"Compares the two strings in alphabetical order. If the two strings are the same, it returns 0. If the first string is lower, it returns a number lower than 0. If the second string is lower, it returns a number bigger than 0."}]

[{"index":"boolean equals(string s1, string s2) (Static)","0":"Checks whether two strings are the same."}]