Skip to content

text

Module

Contains functions and filters to work with texts.

Exports

asLowerCase Makes all characters in text lower case
asNumber Turns a text into a number. If the text can't be parsed as a number, returns nothing.
asUpperCase Makes all characters in text upper case
decode Decodes text to binary data using keywords like base64, base64Url, hex, or utf8/text.
encode Encodes binary data to a text format using keywords like base64, base64Url, hex, or utf8/text.
explode Splits a text into an iterator of texts based on a given separator pattern
format Substitutes named placeholders in a text template with values from a record.
implode Joins an iterator of texts into a single text using a separator
indexOf Returns the index of the first occurrence of the pattern in a texgt
lastIndexOf Returns the index of the last occurrence of the pattern in a texgt
replace Replaces matching substring in a text.
slice Extracts a substring from an input text.
trim Removes leading and trailing whitespace and tab characters from a text value.