Returns the numeric code of the first character, or zero for empty text.
Other multibyte encodings accept only ASCII characters.
Maps to PostgreSQL ASCII, which returns Unicode code points with UTF8.
Returns the character for an integer code point. PostgreSQL rejects zero and invalid code points.
Other multibyte encodings accept only ASCII characters.
Maps to PostgreSQL CHR, which interprets Unicode code points with UTF8.
Pads on the right to length by cycling fill, truncating the source on the right if needed.
Padding "ab" to 5 with "xy" yields "abxyx"; empty fill adds nothing and non-positive length yields "".
Maps to PostgreSQL RPAD.
Pads on the left to length by cycling fill, truncating the source on the right if needed.
Padding "ab" to 5 with "xy" yields "xyxab"; empty fill adds nothing and non-positive length yields "".
Maps to PostgreSQL LPAD.
Returns the 1-based position of substring in expression, or zero when absent.
Returns NULL if either argument is NULL; position("banana", "ana") evaluates to 2.
Maps to PostgreSQL STRPOS.
Returns captures from the first match, or NULL when there is no match. Requires PostgreSQL 10 or newer.
Capture elements are nullable because optional groups can be unmatched.
Maps to PostgreSQL REGEXP_MATCH.
Replaces the first POSIX regular-expression match in source, or returns source unchanged when none exists.
RegexReplaceFlags::GLOBAL replaces every match; RegexReplaceFlags::CASE_INSENSITIVE ignores case.
replacement supports PostgreSQL backreferences (\1 through \9, \&, and \\ for a literal backslash).
Returns NULL if source, pattern, or replacement is NULL.
Maps to PostgreSQL REGEXP_REPLACE.
Splits source around POSIX regular-expression matches into a text array.
Returns source as the only element when no match exists.
Zero-length matches at the start or end, or immediately after a previous match, are ignored.
RegexSplitFlags::CASE_INSENSITIVE enables case-insensitive matching.
Returns NULL if source or pattern is NULL.
Maps to PostgreSQL REGEXP_SPLIT_TO_ARRAY.
Replaces count characters from the 1-based start with replacement.
Returns NULL if either string argument is NULL.
Maps to PostgreSQL’s callable OVERLAY form.
Splits a string into a text array using a delimiter.
A NULL delimiter splits the source into individual characters.
Maps to PostgreSQL STRING_TO_ARRAY.
Returns the 1-based field from a delimited string.
Negative indexes count from the end on PostgreSQL 14 or newer.
PostgreSQL rejects an index of zero and returns an empty string for an out-of-range index.
Maps to PostgreSQL SPLIT_PART.
Tests whether expression begins with the exact, case-sensitive prefix.
Returns NULL if either argument is NULL; starts_with("PostgreSQL", "Post") evaluates to true.
Requires PostgreSQL 11 or newer.
Maps to PostgreSQL STARTS_WITH.
Returns up to count characters from the 1-based start.
From "abcdef", (2, 3) yields "bcd" and (0, 3) yields "ab"; negative counts are rejected.
Maps to PostgreSQL SUBSTRING.
Converts text to ASCII, primarily by removing accents.
Supports only LATIN1, LATIN2, LATIN9, and WIN1250 database encodings, not UTF8.
Maps to PostgreSQL TO_ASCII(expression).
Replaces characters positionally, deleting from characters without a corresponding to character.
Returns NULL if any argument is NULL.
Maps to PostgreSQL TRANSLATE.
Removes the longest span made only of characters in the characters set from both ends.
For example, trimming "xyxtrimyyx" with "xyz" yields "trim".
Maps to PostgreSQL TRIM(BOTH characters FROM expression).