Here is a list of string function which are very useful...
string.byte() | Returns the internal numerical codes of the characters in a string. |
string.char() | Returns a string in which each character has the internal numerical code equal to its corresponding argument. |
string.find() | Looks for the first match of a pattern in a string. If found, it returns the indices where the occurrence starts and ends; otherwise, returns nil. |
string.format() | Returns a formatted string following the description given in its arguments. |
string.gmatch() | Returns a pattern-finding iterator. |
string.gsub() | Replaces all occurrences of a pattern in a string. |
string.len() | Returns the length of a string (number of characters). |
string.lower() | Changes uppercase characters in a string to lowercase. |
string.match() | Extracts substrings by matching patterns in a string. |
string.rep() | Replicates a string by returning a string that is the concatenation of n copies of a specified string. |
string.reverse() | Reverses a string. |
string.sub() | Returns a substring (a specified portion of an existing string). |
string.upper() | Changes lowercase characters in a string to uppercase. |
Comments
Post a Comment