0% found this document useful (0 votes)
139 views

String Functions

The document describes various string functions in Snowflake including: - Functions to manipulate, compare, extract substrings from, pad, trim, and modify case of strings - Functions to test string patterns and contents - Functions to parse and split strings

Uploaded by

venu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

String Functions

The document describes various string functions in Snowflake including: - Functions to manipulate, compare, extract substrings from, pad, trim, and modify case of strings - Functions to test string patterns and contents - Functions to parse and split strings

Uploaded by

venu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

String Functions

Function Description
Returns a one-character native string that corresponds to
char_string
the specified character code.
Returns a decimal string of the specified length or longer,
decimal_lpad
left-padded with a specified character as needed.
Returns a decimal string of the specified length or longer,
decimal_lrepad left-padded with a specified character as needed and
trimmed of leading zeros.
Returns a decimal from a string that has been trimmed of
decimal_strip
leading zeros and non-numeric characters.
Returns 1 (true) if a string ends with the specified suffix;
ends_with
0 (false) otherwise.
is_blank Tests whether a string contains only blank characters.
is_bzero Tests whether an object is composed of all binary zero bytes.
Returns the first string in a target string that matches a regular
re_get_match
expression.
Returns a vector of substrings of a target string that match a regular
re_get_matches
expression containing up to nine capturing groups.
Returns the index of the first character of a substring of a target
re_index
string that matches a specified regular expression.
Replaces substrings of a target string that match a specified
re_match_replace
regular expression.
Replaces all substrings in a target string that match a specified regular
re_replace
expression.
Replaces the first substring in a target string that matches a specified
re_replace_first
regular expression.
starts_with Returns true if the string starts with the supplied prefix.
string_char Returns the character code of a specific character in a string.
string_compare Returns a number representing the result of comparing two strings.
string_concat Concatenates multiple string arguments and returns a NUL-delimited string.
string_downcase Returns a string with any uppercase letters converted to lowercase.
Compares the contents of two strings and returns a string containing characters
string_filter
that appear in both of them.
string_filter_out Returns characters that appear in one string but not in another.
Returns the index of the first character of the first occurrence of a string within
string_index
another string.
string_is_alphabetic Returns 1 if a specified string contains all alphabetic characters, or 0 otherwise.
string_is_numeric Returns 1 if a specified string contains all numeric characters, or 0 otherwise.
string_join Concatenates vector string elements into a single string.
string_length Returns the number of characters in a string.
string_like Tests whether a string matches a specified pattern.
string_lpad Returns a string of a specified length, left-padded with a given character.
Returns a string of a specified length, trimmed of leading and trailing blanks
string_lrepad and
left-padded with a given character.
string_lrtrim Returns a string trimmed of leading and trailing blank characters.
string_ltrim Returns a string trimmed of leading blank characters.
string_pad Returns a right-padded string.
Returns a substring that starts at the beginning of the parent string and is of the
string_prefix
specified length.
Returns a string of a specified length trimmed of any leading and trailing blank
string_repad characters,
then right-padded with a given character.
string_replace Returns a string after replacing one substring with another.
Return+B14s a string after replacing the first occurrence of one substring with
string_replace_first
another.
Returns the index of the first character of the last occurrence of a string within
string_rindex
another string.
string_split Returns a vector consisting of substrings of a specified string.
string_split_no_empty Behaves like string_split, but excludes empty strings from its output.
string_substring Returns a substring of a string.
string_trim Returns a string trimmed of trailing blank characters.
string_upcase Returns a string with any lowercase letters converted to uppercase.
test_characters_all Tests a string for the presence of ALL characters in another string.
test_characters_any Tests a string for the presence of ANY characters in another string.

You might also like