Checks if text contains a search string. Example: text='hello world', search='world' → true
a text and search string
boolean
Checks if text starts with a search string. Example: text='hello world', search='hello' → true
a text and search string
boolean
Checks if text ends with a search string. Example: text='hello world', search='world' → true
a text and search string
boolean
Returns the index of the first occurrence of a search string. Example: text='hello world', search='world' → 6
a text and search string
index or -1 if not found
Returns the index of the last occurrence of a search string. Example: text='hello world hello', search='hello' → 12
a text and search string
index or -1 if not found
Returns the character at the specified index. Example: text='hello', index=1 → 'e'
a text and index
character
Tests if text matches a regular expression pattern. Example: text='hello123', pattern='[0-9]+' → true
a text and regex pattern
boolean
Matches text against a regular expression and returns matches. Example: text='hello123world456', pattern='[0-9]+', flags='g' → ['123', '456']
a text and regex pattern
array of matches or null
Replaces text matching a regular expression pattern. Example: text='hello123world456', pattern='[0-9]+', flags='g', replaceWith='X' → 'helloXworldX'
a text, regex pattern, and replacement
text with replacements
Searches text for a regular expression pattern and returns the index. Example: text='hello123', pattern='[0-9]+' → 5
a text and regex pattern
index or -1 if not found
Splits text using a regular expression pattern. Example: text='a1b2c3', pattern='[0-9]+' → ['a', 'b', 'c']
a text and regex pattern
array of split strings
Splits text into multiple pieces using a separator string. Example: text='apple,banana,cherry', separator=',' → ['apple', 'banana', 'cherry']
a text
text
Replaces all occurrences of a search string with a replacement string. Example: text='hello hello', search='hello', replaceWith='hi' → 'hi hi'
a text
text
Joins multiple items into a single text string using a separator. Example: list=['apple', 'banana', 'cherry'], separator=', ' → 'apple, banana, cherry'
a list of items
text
Transform any item to text
any item
text
Transform each item in list to text
list of items
texts
Formats text with placeholder values using {0}, {1}, etc. syntax. Example: text='Point: ({0}, {1})', values=[10, 5] → 'Point: (10, 5)'
a text and values
formatted text
Extracts a section of text between two indices. Example: text='hello world', start=0, end=5 → 'hello'
a text, start and end indices
extracted text
Extracts a section of text and returns a new string. Example: text='hello world', start=0, end=5 → 'hello'
a text, start and end indices
extracted text
Pads text from the start to reach target length. Example: text='x', length=3, padString='a' → 'aax'
a text, target length and pad string
padded text
Pads text from the end to reach target length. Example: text='x', length=3, padString='a' → 'xaa'
a text, target length and pad string
padded text
Repeats text a specified number of times. Example: text='ha', count=3 → 'hahaha'
a text and count
repeated text
Concatenates multiple text strings. Example: texts=['hello', ' ', 'world'] → 'hello world'
array of texts
concatenated text
Converts a character to vector paths (polylines) with width and height data for rendering. Uses simplex stroke font to generate 2D line segments representing the character shape. Example: char='A', height=10 → {width:8, height:10, paths:[[points forming A shape]]}
a text
width, height and segments as json
Converts multi-line text to vector paths (polylines) with alignment and spacing controls. Supports line breaks, letter spacing, line spacing, horizontal alignment, and origin centering. Example: text='Hello\nWorld', height=10, align=center → [{line1 chars}, {line2 chars}]
a text as string
segments
Creates and returns a text string (pass-through for text input). Example: text='Hello World' → 'Hello World'