Skip to content

Strings

Text processing helpers.

Conversions

  • STRING(x) → string representation or null for null.
  • NUMBER(x) → parses numbers/booleans/strings to numeric; errors on invalid strings; returns null for null.
  • BOOLEAN(x) → truthiness: false for null, empty string, or zero; true otherwise.
  • INT(x) → strict integer conversion for numbers/booleans/strings; errors on fractional values; returns null for null.
  • PARSE_INT(x[, default]) → tolerant integer parsing for strings; uses digits only and returns default (or 0) on null/no digits.

Run it: STRING/NUMBER/BOOLEAN example.

Text operations

  • SUBSTRING(str, start[, len]) → substring with safe bounds; errors if start > length.
  • CONTAINS(str, substr) → boolean containment.
  • MATCH(str, pattern) → regex matches as a list.
  • REPLACE(str, pattern, repl) → regex replace.
  • SPLIT(str, sep) → list of parts.
  • JOIN(list, sep) → concatenates stringified elements with a separator.
  • UPPER(str) / LOWER(str) / TRIM(str) → casing and whitespace helpers.

Run it: Text helpers example.