text Module

String manipulation functions for cleaning, formatting, and transforming text in your queries.

Quick Example

$ Quick Example
$ ctrl+enter to run

Case & Whitespace

Search & Match

Manipulation

Measurement & Encoding

Formatting

Function Reference

FunctionDescription
text::asciiGet the ASCII code of the first character
text::charConvert an ASCII code to a character
text::concatConcatenate multiple strings together
text::containsCheck if a string contains a substring
text::countCount the number of characters in a string
text::ends_withCheck if a string ends with a suffix
text::format_bytesFormat bytes using binary units (KiB, MiB)
text::format_bytes_siFormat bytes using SI units (KB, MB)
text::index_ofFind the index of a substring
text::lengthGet the length of a string
text::lowerConvert a string to lowercase
text::pad_leftPad a string on the left
text::pad_rightPad a string on the right
text::repeatRepeat a string multiple times
text::replaceReplace all occurrences of a substring
text::reverseReverse the characters in a string
text::starts_withCheck if a string starts with a prefix
text::substringExtract a portion of a string
text::trimRemove leading and trailing whitespace
text::trim_endRemove trailing whitespace
text::trim_startRemove leading whitespace
text::upperConvert a string to uppercase