Package dev.frostlake.functions.scalar.string
package dev.frostlake.functions.scalar.string
-
ClassesClassDescriptionCHARINDEX(needle, haystack [, start]) — POSITION's argument order; BINARY pairs search by BYTE.
COLLATE(expr, 'spec'), also writtenexpr COLLATE 'spec': the string itself, carrying the named collation into whatever compares it.COLLATION(expr): the collation specificationexprcarries, lower-cased, or NULL when it carries none.ILIKE(subject, pattern) — the function-call form of thesubject ILIKE patternoperator (case-INsensitive SQL wildcard match).INSERT(base, position, length, insertion).JAROWINKLER_SIMILARITY(string1, string2) — the Jaro-Winkler similarity of the two strings scaled to an integer 0–100 (0 = no similarity, 100 = exact match), matching Snowflake.LEFT(expr, n) — the leading n characters of a VARCHAR, or the leading n BYTES of a BINARY.LIKE(subject, pattern) — the function-call form of thesubject LIKE patternoperator (case-sensitive SQL wildcard match,%= any run,_= one char).LPAD(expr, len [, pad]) — a VARCHAR padded to len characters, or a BINARY padded to len BYTES.NORMALIZE(x, lo, hi) — Snowflake's min-max normalization(x - lo) / (hi - lo), NOT Unicode normalization (live-verified:NORMALIZE(5, 0, 10)is 0.5).PARSE_IP(ip_address, type [, permissive]) — parses an IPv4/IPv6 address (optionally in CIDRaddr/prefixform) into a VARIANT OBJECT, matching Snowflake.PARSE_URL(url [, permissive]) — parses a URL into a VARIANT OBJECT with Snowflake's keys, in ALPHABETICAL order (live-verified):fragment, host, parameters, path, port, query, scheme.POSITION(needle, haystack [, start]) — the 1-based position of needle, or 0 when absent.RANDSTR(length, generator) — a deterministic random alphanumeric string seeded by the generator.REGEXP_COUNT(subject, pattern [, position [, parameters]]) — the number of matches ofpatternat or afterposition(1-based, default 1).Shared helpers for the REGEXP_* functions: translating Snowflake'sregex_parametersflag string toPatternflags, detecting thee(extract) flag, and converting a Snowflake replacement string (backreferences\0–\9) to Java's replacement syntax.REGEXP_INSTR(subject, pattern [, position [, occurrence [, option [, parameters [, group_num]]]]]) — the 1-based position of theoccurrence-th match (default 1) at or afterposition(default 1), or 0 when there is none.REGEXP_LIKE(subject, pattern [, parameters]) — TRUE whenpatternmatches the ENTIRE subject (implicitly anchored, as in Snowflake).REGEXP_REPLACE(subject, pattern [, replacement [, position [, occurrence [, parameters]]]]) — replace matches ofpatternwithreplacement.REGEXP_SUBSTR(subject, pattern [, position [, occurrence [, parameters [, group_num]]]]) — theoccurrence-th match (default 1) at or afterposition(1-based, default 1).REGEXP_SUBSTR_ALL(subject, pattern [, position [, occurrence [, parameters [, group_num]]]]) — returns a VARIANT ARRAY with an element for every match at or afterposition(1-based, default 1), starting from theoccurrence-th match (default 1).REPEAT(s, n): the stringntimes over, NULL when either argument is NULL.REVERSE(expr) — a VARCHAR reversed by characters, or a BINARY reversed by BYTES.RIGHT(expr, n) — the trailing n characters of a VARCHAR, or the trailing n BYTES of a BINARY.RPAD(expr, len [, pad]) — a VARCHAR padded to len characters, or a BINARY padded to len BYTES.RTRIMMED_LENGTH(s) — the length of the string without trailing blanks.SEARCH(data, query [, ANALYZER => '…'] [, SEARCH_MODE => 'OR'|'AND']) — full-text token search, matching Snowflake's semantics with the default analyzer: both sides tokenize on non-alphanumeric boundaries, case-insensitively; OR mode (the default) is TRUE when ANY query token occurs among the data tokens, AND mode when ALL of them do.SPACE(n):nblanks.SPLIT(string, delimiter) — splitsstringon the literaldelimiterinto an ARRAY of substrings (rendered as a JSON array, the engine's VARIANT representation).STRTOK_TO_ARRAY(string [, delimiters]) — tokenizesstringon any character indelimiters(each character is its own delimiter; the default is a single space) and returns a VARIANT ARRAY of the non-empty tokens.SUBSTRING(expr, start [, length]) — a slice of a VARCHAR by characters or of a BINARY by BYTES.TRY_PARSE_IP — PARSE_IP that returns NULL instead of erroring on invalid input.TRY_VALIDATE_UTF8(x) — the input as a string when its bytes are valid UTF-8, else NULL.VALIDATE_UTF8(x) — the input as a string when its bytes are valid UTF-8.