a text and index
character
Concatenates multiple text strings. Example: texts=['hello', ' ', 'world'] → 'hello world'
array of texts
concatenated text
Creates and returns a text string (pass-through for text input). Example: text='Hello World' → 'Hello World'
a text
text
Checks if text ends with a search string. Example: text='hello world', search='world' → true
a text and search string
boolean
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
Checks if text contains 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
Checks if text is empty or only whitespace. Example: text=' ' → true
a text
boolean
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
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 length of text. Example: text='hello' → 5
a text
length
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
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
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
Tests if text matches a regular expression pattern. Example: text='hello123', pattern='[0-9]+' → true
a text and regex pattern
boolean
Repeats text a specified number of times. Example: text='ha', count=3 → 'hahaha'
a text and count
repeated 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
Reverses the characters in text. Example: text='hello' → 'olleh'
a text
reversed 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
Splits text into multiple pieces using a separator string. Example: text='apple,banana,cherry', separator=',' → ['apple', 'banana', 'cherry']
a text
text
Checks if text starts with a search string. Example: text='hello world', search='hello' → true
a text and search string
boolean
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
Converts text to lowercase. Example: text='HELLO' → 'hello'
a text
lowercase text
Lowercases the first character of text. Example: text='Hello World' → 'hello World'
a text
text with first character lowercase
Transform any item to text
any item
text
Transform each item in list to text
list of items
texts
Converts text to uppercase. Example: text='hello' → 'HELLO'
a text
uppercase text
Capitalizes the first character of text. Example: text='hello world' → 'Hello world'
a text
text with first character uppercase
Removes whitespace from both ends of text. Example: text=' hello ' → 'hello'
a text
trimmed text
Removes whitespace from the end of text. Example: text=' hello ' → ' hello'
a text
trimmed text
Removes whitespace from the start of text. Example: text=' hello ' → 'hello '
a text
trimmed 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: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 World', height=10, align=center → [{line1 chars}, {line2 chars}]
a text as string
segments
Generated using TypeDoc
Returns the character at the specified index. Example: text='hello', index=1 → 'e'
query
char at
false