String Functions
chr
Returns the Unicode code point n as a single character string.
Examples:
Supported Signatures
codepoint
Returns the Unicode code point of the only character of string
.
Examples:
Supported Signatures
concat
Returns the concatenation of string1, string2, β¦, stringN. This function provides the same functionality as the SQL-standard concatenation operator (||).
Examples:
Supported Signatures
concat_ws
Using the first array string0
element as separator, returns the concatenation of all subsequent strings string1, string2, β¦ If `string0β is null, then the return value is null. Any null values provided in the arguments after the separator are skipped.
Examples:
Supported Signatures
length
Returns the length of string in characters.
Examples:
Supported Signatures
levenshtein_distance
Returns the Levenshtein edit distance of string1 and string2, i.e. the minimum number of single-character edits (insertions, deletions or substitutions) needed to change string1 into string2.
Supported Signatures
lower
Converts string to lowercase.
Examples:
Supported Signatures
lpad
Left pads string to size characters with padstring. If size is less than the length of string, the result is truncated to size characters. size must not be negative and padstring must be non-empty.
Examples:
Supported Signatures
ltrim
Removes leading whitespace from string.
Examples:
Supported Signatures
replace
Removes all instances of search from string.
Examples:
Supported Signatures
reverse
Returns string with the characters in reverse order.
Examples:
Supported Signatures
rpad
Right pads string to size characters with padstring. If size is less than the length of string, the result is truncated to size characters. size must not be negative and padstring must be non-empty.
Examples:
Supported Signatures
rtrim
Removes trailing whitespace from string.
Examples:
Supported Signatures
split
Splits string on delimiter and returns an array.
Examples:
Supported Signatures
split_part
Splits string on delimiter and returns the field index. Field indexes start with 1. If the index is larger than the number of fields, then null is returned.
Examples:
Supported Signatures
starts_with
Tests whether substring is a prefix of string.
Examples:
Supported Signatures
strpos
Returns the starting position of the first instance of substring in string. Positions start with 1. If not found, 0 is returned.
Examples:
Supported Signatures
substr
This is an alias for substring().
Examples:
Supported Signatures
substring
Returns the rest of string from the starting position start. Positions start with 1. A negative starting position is interpreted as being relative to the end of the string.
Examples:
Supported Signatures
translate
Returns the source string translated by replacing characters found in the from string with the corresponding characters in the to string. If the from string contains duplicates, only the first is used. If the source character does not exist in the from string, the source character will be copied without translation. If the index of the matching character in the from string is beyond the length of the to string, the source character will be omitted from the resulting string.
Examples:
Supported Signatures
trim
Removes any leading and/or trailing characters as specified up to and including string from source.
Examples:
Supported Signatures
upper
Converts string to uppercase.
Examples:
Supported Signatures