--- title: "String" slug: "dev-database-reference-sql-functions-string" updated: 2026-11-05T22:16:11Z published: 2026-11-05T22:16:11Z canonical: "docs.vastdata.com/dev-database-reference-sql-functions-string" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # String Text functions on VARCHAR values, in four pages. Start with Text basics for length, case, substrings and replacing; Search and split covers finding text and splitting it, Trimming and padding the fixed-width forms, and Regular expressions the regexp functions. - **[Text basics](/develop/docs/dev-database-reference-sql-functions-string-text-basics)**: Length, case, concatenation, substrings, replacing, formatting, similarity and path functions on VARCHAR values in the VAST Query Engine. - **[Search and split](/develop/docs/dev-database-reference-sql-functions-string-search-and-split)**: Find text inside VARCHAR values with prefix, suffix, substring and LIKE tests, and split strings into parts or lists. - **[Trimming and padding](/develop/docs/dev-database-reference-sql-functions-string-trimming-and-padding)**: Remove leading and trailing characters from VARCHAR values, or pad them to a fixed width, in the VAST Query Engine. - **[Regular expressions](/develop/docs/dev-database-reference-sql-functions-string-regular-expressions)**: Match, extract, replace and split VARCHAR values with regular expressions in the VAST Query Engine, with the pattern syntax and options. - **[ascii](/develop/docs/dev-database-reference-sql-functions-string-ascii)**: Return the Unicode code point of the first character of a VARCHAR in the VAST Query Engine, including code points above 127. - **[chr](/develop/docs/dev-database-reference-sql-functions-string-chr)**: Return the character with a given Unicode code point as a VARCHAR in the VAST Query Engine, and the errors for numbers that aren't valid code points. - **[ord](/develop/docs/dev-database-reference-sql-functions-string-ord)**: Return the Unicode code point of the first character of a VARCHAR, or -1 for an empty string, in the VAST Query Engine; unicode is the same function. - **[bit_length](/develop/docs/dev-database-reference-sql-functions-string-bit-length)**: Count the bits in the UTF-8 encoding of a VARCHAR, or the bits of a BIT value, in the VAST Query Engine. - **[length_grapheme](/develop/docs/dev-database-reference-sql-functions-string-length-grapheme)**: Count the grapheme clusters in a VARCHAR, what a reader sees as characters, in the VAST Query Engine. - **[length](/develop/docs/dev-database-reference-sql-functions-string-length)**: Count the characters in a VARCHAR, the bits in a BIT value or the elements of a list in the VAST Query Engine; len is the same function. - **[strlen](/develop/docs/dev-database-reference-sql-functions-string-strlen)**: Count the bytes in the UTF-8 encoding of a VARCHAR in the VAST Query Engine. - **[COLLATE nocase and noaccent](/develop/docs/dev-database-reference-sql-functions-string-collate)**: Compare strings without regard to case, accents or both with COLLATE nocase, noaccent and nocase.noaccent in the VAST Query Engine. - **[lower](/develop/docs/dev-database-reference-sql-functions-string-lower)**: Convert a VARCHAR to lower case, including letters outside ASCII, in the VAST Query Engine; lcase is the same function. - **[upper](/develop/docs/dev-database-reference-sql-functions-string-upper)**: Convert a VARCHAR to upper case, including letters outside ASCII, in the VAST Query Engine; ucase is the same function. - **[|| (concatenation)](/develop/docs/dev-database-reference-sql-functions-string-concat-operator)**: Join two strings, two lists or two BLOB values with the || operator in the VAST Query Engine; a NULL on either side gives NULL. - **[concat_ws](/develop/docs/dev-database-reference-sql-functions-string-concat-ws)**: Join values into one VARCHAR with a separator between them in the VAST Query Engine, skipping NULL values. - **[concat](/develop/docs/dev-database-reference-sql-functions-string-concat)**: Join values into one string, skipping NULLs, or join lists, in the VAST Query Engine. - **[damerau_levenshtein](/develop/docs/dev-database-reference-sql-functions-string-damerau-levenshtein)**: Return the edit distance between two strings in the VAST Query Engine, counting a swap of two neighbouring characters as one edit. - **[hamming](/develop/docs/dev-database-reference-sql-functions-string-hamming)**: Count the positions at which two strings of the same length differ in the VAST Query Engine; mismatches is the same function. - **[jaccard](/develop/docs/dev-database-reference-sql-functions-string-jaccard)**: Return the Jaccard similarity of the sets of characters in two strings in the VAST Query Engine, from 0 to 1. - **[jaro_similarity](/develop/docs/dev-database-reference-sql-functions-string-jaro-similarity)**: Score how alike two strings are, from 0.0 to 1.0, with the Jaro similarity in the VAST Query Engine, optionally with a cutoff below which the score is 0.0. - **[jaro_winkler_similarity](/develop/docs/dev-database-reference-sql-functions-string-jaro-winkler-similarity)**: Score how alike two strings are with the Jaro-Winkler similarity in the VAST Query Engine: the Jaro score, raised for strings that start the same way, with an optional cutoff. - **[levenshtein](/develop/docs/dev-database-reference-sql-functions-string-levenshtein)**: Return the edit distance between two strings in the VAST Query Engine: the fewest insertions, deletions and substitutions that turn one into the other; editdist3 is the same function. - **[format](/develop/docs/dev-database-reference-sql-functions-string-format)**: Build a VARCHAR from a template with {} placeholders, positions and format specifications for width, alignment, decimals and number bases in the VAST Query Engine. - **[printf](/develop/docs/dev-database-reference-sql-functions-string-printf)**: Build a VARCHAR from a C-style template with %s, %d, %f, %x and other conversions, widths and precisions in the VAST Query Engine. - **[left_grapheme](/develop/docs/dev-database-reference-sql-functions-string-left-grapheme)**: Return the first n grapheme clusters of a VARCHAR in the VAST Query Engine, so accented letters and flag emoji are never cut in half. - **[left](/develop/docs/dev-database-reference-sql-functions-string-left)**: Return the first n characters of a VARCHAR in the VAST Query Engine, or all but the last n with a negative count. - **[right_grapheme](/develop/docs/dev-database-reference-sql-functions-string-right-grapheme)**: Return the last n grapheme clusters of a VARCHAR in the VAST Query Engine, so accented letters and flag emoji are never cut in half. - **[right](/develop/docs/dev-database-reference-sql-functions-string-right)**: Return the last n characters of a VARCHAR in the VAST Query Engine, or all but the first n with a negative count. - **[substring_grapheme](/develop/docs/dev-database-reference-sql-functions-string-substring-grapheme)**: Return part of a VARCHAR by start position and length, counted in grapheme clusters, in the VAST Query Engine, so accented letters and flag emoji are never cut in half. - **[substring](/develop/docs/dev-database-reference-sql-functions-string-substring)**: Return part of a VARCHAR by start position and length in the VAST Query Engine; substr, SUBSTRING(s FROM a FOR b) and the s[start:end] and s[i] slices do the same. - **[nfc_normalize](/develop/docs/dev-database-reference-sql-functions-string-nfc-normalize)**: Convert a string to Unicode normalization form C in the VAST Query Engine, so a letter and a combining accent become one character and equal-looking text compares equal. - **[strip_accents](/develop/docs/dev-database-reference-sql-functions-string-strip-accents)**: Remove accents from the letters of a string in the VAST Query Engine, for accent-insensitive search and matching. - **[url_decode](/develop/docs/dev-database-reference-sql-functions-string-url-decode)**: Decode a percent-encoded URL string in the VAST Query Engine: each % and two hexadecimal digits becomes the byte it stands for. - **[url_encode](/develop/docs/dev-database-reference-sql-functions-string-url-encode)**: Percent-encode a string for use in a URL in the VAST Query Engine: every byte other than letters, digits and - . _ ~ becomes % and two hexadecimal digits. - **[parse_dirname](/develop/docs/dev-database-reference-sql-functions-string-parse-dirname)**: Get the top-level directory of a file path in the VAST Query Engine: the first component, or / for an absolute path. - **[parse_dirpath](/develop/docs/dev-database-reference-sql-functions-string-parse-dirpath)**: Get the directory part of a file path in the VAST Query Engine: everything before the last separator. - **[parse_filename](/develop/docs/dev-database-reference-sql-functions-string-parse-filename)**: Get the file name at the end of a path in the VAST Query Engine, optionally without its last extension and with a chosen separator. - **[parse_path](/develop/docs/dev-database-reference-sql-functions-string-parse-path)**: Split a file path into a list of its components in the VAST Query Engine, splitting on / and \ by default or on one separator you choose. - **[repeat](/develop/docs/dev-database-reference-sql-functions-string-repeat)**: Repeat a VARCHAR, a BLOB or a list a number of times in the VAST Query Engine. - **[replace](/develop/docs/dev-database-reference-sql-functions-string-replace)**: Replace every occurrence of a substring in a VARCHAR with another string in the VAST Query Engine, without patterns. - **[reverse](/develop/docs/dev-database-reference-sql-functions-string-reverse)**: Reverse the characters of a VARCHAR in the VAST Query Engine, keeping accented letters and flag emoji whole. - **[translate](/develop/docs/dev-database-reference-sql-functions-string-translate)**: Replace or remove single characters of a VARCHAR, each by the character at the same position in a second string, in the VAST Query Engine. - **[split_part](/develop/docs/dev-database-reference-sql-functions-string-split-part)**: Split a VARCHAR on a separator and return one field by its position, counting from the start or the end, in the VAST Query Engine. - **[contains](/develop/docs/dev-database-reference-sql-functions-string-contains)**: Test whether a VARCHAR contains a given substring anywhere in the VAST Query Engine; the same name also tests lists and maps. - **[ends_with](/develop/docs/dev-database-reference-sql-functions-string-ends-with)**: Test whether a VARCHAR ends with a given suffix in the VAST Query Engine; suffix is the same function. - **[starts_with](/develop/docs/dev-database-reference-sql-functions-string-starts-with)**: Test whether a VARCHAR begins with a given prefix in the VAST Query Engine; prefix and the ^@ operator are the same test. - **[strpos](/develop/docs/dev-database-reference-sql-functions-string-strpos)**: Find the position of the first occurrence of a substring in a VARCHAR in the VAST Query Engine; instr and position(substring IN s) do the same. - **[GLOB](/develop/docs/dev-database-reference-sql-functions-string-glob)**: Match a VARCHAR against a shell-style pattern with *, ? and [...] in the VAST Query Engine; ~~~ is the operator form. - **[ILIKE and NOT ILIKE](/develop/docs/dev-database-reference-sql-functions-string-ilike)**: Match a VARCHAR against a LIKE pattern without regard to case in the VAST Query Engine, with an optional ESCAPE character; ~~ *and !~~* are the operator forms. - **[like_escape](/develop/docs/dev-database-reference-sql-functions-string-like-escape)**: Match a VARCHAR against a LIKE pattern with an escape character, as a function, in the VAST Query Engine; not_like_escape returns the opposite. - **[LIKE and NOT LIKE](/develop/docs/dev-database-reference-sql-functions-string-like)**: Match a VARCHAR against a pattern with % and _ wildcards in the VAST Query Engine, with an optional ESCAPE character; ~~ and !~~ are the operator forms. - **[ilike_escape](/develop/docs/dev-database-reference-sql-functions-string-ilike-escape)**: Match a VARCHAR against a case-insensitive LIKE pattern with an escape character, as a function, in the VAST Query Engine; not_ilike_escape returns the opposite. - **[string_split](/develop/docs/dev-database-reference-sql-functions-string-string-split)**: Split a VARCHAR on a literal separator into a list of parts in the VAST Query Engine; str_split, split and string_to_array are the same function. - **[ltrim](/develop/docs/dev-database-reference-sql-functions-string-ltrim)**: Remove spaces, or any characters you list, from the start of a VARCHAR in the VAST Query Engine. - **[rtrim](/develop/docs/dev-database-reference-sql-functions-string-rtrim)**: Remove spaces, or any characters you list, from the end of a VARCHAR in the VAST Query Engine. - **[trim](/develop/docs/dev-database-reference-sql-functions-string-trim)**: Remove spaces, or any characters you list, from both ends of a VARCHAR in the VAST Query Engine; trim(BOTH | LEADING | TRAILING chars FROM s) is the standard SQL form. - **[lpad](/develop/docs/dev-database-reference-sql-functions-string-lpad)**: Pad a VARCHAR on the left with a fill string to a given number of characters, or cut it to that length, in the VAST Query Engine. - **[rpad](/develop/docs/dev-database-reference-sql-functions-string-rpad)**: Pad a VARCHAR on the right with a fill string to a given number of characters, or cut it to that length, in the VAST Query Engine. - **[regexp_split_to_array](/develop/docs/dev-database-reference-sql-functions-string-regexp-split-to-array)**: Split a VARCHAR at every match of a regular expression into a list of parts in the VAST Query Engine; string_split_regex and str_split_regex are the same function. - **[regexp_split_to_table](/develop/docs/dev-database-reference-sql-functions-string-regexp-split-to-table)**: Split a VARCHAR at every match of a regular expression and return one row for each part, in the SELECT list, in the VAST Query Engine. - **[SIMILAR TO](/develop/docs/dev-database-reference-sql-functions-string-similar-to)**: Test whether a whole VARCHAR matches a regular expression with SIMILAR TO in the VAST Query Engine; NOT SIMILAR TO returns the opposite. - **[regexp_extract_all](/develop/docs/dev-database-reference-sql-functions-string-regexp-extract-all)**: Return every match of a regular expression in a VARCHAR, or one group of every match, as a list in the VAST Query Engine. - **[regexp_extract](/develop/docs/dev-database-reference-sql-functions-string-regexp-extract)**: Return the first match of a regular expression in a VARCHAR, one of its groups, or a STRUCT of named groups, in the VAST Query Engine. - **[regexp_full_match](/develop/docs/dev-database-reference-sql-functions-string-regexp-full-match)**: Test whether a regular expression matches a whole VARCHAR in the VAST Query Engine; the ~ operator is the same test and !~ its negation. - **[regexp_matches](/develop/docs/dev-database-reference-sql-functions-string-regexp-matches)**: Test whether a regular expression matches anywhere in a VARCHAR in the VAST Query Engine, with options such as case-insensitive matching. - **[regexp_replace](/develop/docs/dev-database-reference-sql-functions-string-regexp-replace)**: Replace the first match, or with option g every match, of a regular expression in a VARCHAR in the VAST Query Engine, with group references in the replacement. - **[Regular-expression syntax and options](/develop/docs/dev-database-reference-sql-functions-string-regexp-syntax)**: The pattern syntax, the options string and the unsupported pattern features of the regular-expression functions in the VAST Query Engine. - **[regexp_escape](/develop/docs/dev-database-reference-sql-functions-string-regexp-escape)**: Escape the characters that have a meaning in a regular expression, so that a string from a column or a parameter is matched literally by the VAST Query Engine. - **[error](/develop/docs/dev-database-reference-sql-functions-string-error)**: Stop a query with your own error message in the VAST Query Engine, for example inside a CASE to reject rows that break a rule. - **[bin](/develop/docs/dev-database-reference-sql-functions-string-bin)**: Write the bytes of a string, or an integer, as text of 0s and 1s in the VAST Query Engine; to_binary is the same function. - **[from_binary](/develop/docs/dev-database-reference-sql-functions-string-from-binary)**: Read a string of 0s and 1s into a BLOB in the VAST Query Engine, padded on the left to whole bytes; unbin is the same function.