String Functions
String functions are used to manipulate and handle string variables. The following table summarizes the available string functions.
Function | Description |
charlen() |
Returns the number of single-byte or multiple-byte characters in a string. Version 6.0.1 and earlier: function not available. Version 6.1 and later: function available. |
gsub() | Replaces all occurrences of a pattern within a source string. |
length() | Returns the number of bytes in a string. |
pad() | Pads a string with a specified pad character. |
sub() | Replaces the first occurrence of a pattern within a source string. |
substr() | Extracts part of a string. |
tolower() |
Returns a copy of a string, converted to all lowercase. Version 4.0 and earlier: function not available. Version 5.0 and later: function available. |
toupper() |
Returns a copy of a string, converted to all uppercase. Version 4.0 and earlier: function not available. Version 5.0 and later: function available. |