text Module
String manipulation functions for cleaning, formatting, and transforming text in your queries.
Quick Example
$ Quick Example
Case & Whitespace
Search & Match
Manipulation
text::concat
Concatenate multiple strings together
text::substring
Extract a portion of a string
text::replace
Replace all occurrences of a substring
text::repeat
Repeat a string multiple times
text::reverse
Reverse the characters in a string
text::pad_left
Pad a string on the left
text::pad_right
Pad a string on the right
Measurement & Encoding
Formatting
Function Reference
| Function | Description |
|---|---|
text::ascii | Get the ASCII code of the first character |
text::char | Convert an ASCII code to a character |
text::concat | Concatenate multiple strings together |
text::contains | Check if a string contains a substring |
text::count | Count the number of characters in a string |
text::ends_with | Check if a string ends with a suffix |
text::format_bytes | Format bytes using binary units (KiB, MiB) |
text::format_bytes_si | Format bytes using SI units (KB, MB) |
text::index_of | Find the index of a substring |
text::length | Get the length of a string |
text::lower | Convert a string to lowercase |
text::pad_left | Pad a string on the left |
text::pad_right | Pad a string on the right |
text::repeat | Repeat a string multiple times |
text::replace | Replace all occurrences of a substring |
text::reverse | Reverse the characters in a string |
text::starts_with | Check if a string starts with a prefix |
text::substring | Extract a portion of a string |
text::trim | Remove leading and trailing whitespace |
text::trim_end | Remove trailing whitespace |
text::trim_start | Remove leading whitespace |
text::upper | Convert a string to uppercase |
