Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TextBitByBit

Index

Constructors

constructor

Methods

charAt

  • Returns the character at the specified index. Example: text='hello', index=1 → 'e'

    group

    query

    shortname

    char at

    drawable

    false

    Parameters

    Returns string

    character

concat

  • Concatenates multiple text strings. Example: texts=['hello', ' ', 'world'] → 'hello world'

    group

    transform

    shortname

    concat

    drawable

    false

    Parameters

    Returns string

    concatenated text

create

  • Creates and returns a text string (pass-through for text input). Example: text='Hello World' → 'Hello World'

    group

    create

    shortname

    text

    drawable

    false

    Parameters

    Returns string

    text

endsWith

  • Checks if text ends with a search string. Example: text='hello world', search='world' → true

    group

    query

    shortname

    ends with

    drawable

    false

    Parameters

    Returns boolean

    boolean

format

  • Formats text with placeholder values using {0}, {1}, etc. syntax. Example: text='Point: ({0}, {1})', values=[10, 5] → 'Point: (10, 5)'

    group

    transform

    shortname

    format

    drawable

    false

    Parameters

    Returns string

    formatted text

includes

  • Checks if text contains a search string. Example: text='hello world', search='world' → true

    group

    query

    shortname

    includes

    drawable

    false

    Parameters

    Returns boolean

    boolean

indexOf

  • Returns the index of the first occurrence of a search string. Example: text='hello world', search='world' → 6

    group

    query

    shortname

    index of

    drawable

    false

    Parameters

    Returns number

    index or -1 if not found

isEmpty

  • isEmpty(inputs: TextDto): boolean
  • Checks if text is empty or only whitespace. Example: text=' ' → true

    group

    query

    shortname

    is empty

    drawable

    false

    Parameters

    Returns boolean

    boolean

join

  • Joins multiple items into a single text string using a separator. Example: list=['apple', 'banana', 'cherry'], separator=', ' → 'apple, banana, cherry'

    group

    transform

    shortname

    join

    drawable

    false

    Parameters

    Returns string

    text

lastIndexOf

  • Returns the index of the last occurrence of a search string. Example: text='hello world hello', search='hello' → 12

    group

    query

    shortname

    last index of

    drawable

    false

    Parameters

    Returns number

    index or -1 if not found

length

  • Returns the length of text. Example: text='hello' → 5

    group

    query

    shortname

    length

    drawable

    false

    Parameters

    Returns number

    length

padEnd

  • Pads text from the end to reach target length. Example: text='x', length=3, padString='a' → 'xaa'

    group

    transform

    shortname

    pad end

    drawable

    false

    Parameters

    • inputs: TextPadDto

      a text, target length and pad string

    Returns string

    padded text

padStart

  • Pads text from the start to reach target length. Example: text='x', length=3, padString='a' → 'aax'

    group

    transform

    shortname

    pad start

    drawable

    false

    Parameters

    • inputs: TextPadDto

      a text, target length and pad string

    Returns string

    padded text

regexMatch

  • Matches text against a regular expression and returns matches. Example: text='hello123world456', pattern='[0-9]+', flags='g' → ['123', '456']

    group

    regex

    shortname

    regex match

    drawable

    false

    Parameters

    Returns string[]

    array of matches or null

regexReplace

  • Replaces text matching a regular expression pattern. Example: text='hello123world456', pattern='[0-9]+', flags='g', replaceWith='X' → 'helloXworldX'

    group

    regex

    shortname

    regex replace

    drawable

    false

    Parameters

    Returns string

    text with replacements

regexSearch

  • Searches text for a regular expression pattern and returns the index. Example: text='hello123', pattern='[0-9]+' → 5

    group

    regex

    shortname

    regex search

    drawable

    false

    Parameters

    Returns number

    index or -1 if not found

regexSplit

  • Splits text using a regular expression pattern. Example: text='a1b2c3', pattern='[0-9]+' → ['a', 'b', 'c']

    group

    regex

    shortname

    regex split

    drawable

    false

    Parameters

    Returns string[]

    array of split strings

regexTest

  • Tests if text matches a regular expression pattern. Example: text='hello123', pattern='[0-9]+' → true

    group

    regex

    shortname

    test regex

    drawable

    false

    Parameters

    Returns boolean

    boolean

repeat

  • Repeats text a specified number of times. Example: text='ha', count=3 → 'hahaha'

    group

    transform

    shortname

    repeat

    drawable

    false

    Parameters

    Returns string

    repeated text

replaceAll

  • Replaces all occurrences of a search string with a replacement string. Example: text='hello hello', search='hello', replaceWith='hi' → 'hi hi'

    group

    transform

    shortname

    replaceAll

    drawable

    false

    Parameters

    Returns string

    text

reverse

  • Reverses the characters in text. Example: text='hello' → 'olleh'

    group

    transform

    shortname

    reverse

    drawable

    false

    Parameters

    Returns string

    reversed text

slice

  • Extracts a section of text and returns a new string. Example: text='hello world', start=0, end=5 → 'hello'

    group

    transform

    shortname

    slice

    drawable

    false

    Parameters

    Returns string

    extracted text

split

  • Splits text into multiple pieces using a separator string. Example: text='apple,banana,cherry', separator=',' → ['apple', 'banana', 'cherry']

    group

    transform

    shortname

    split

    drawable

    false

    Parameters

    Returns string[]

    text

startsWith

  • Checks if text starts with a search string. Example: text='hello world', search='hello' → true

    group

    query

    shortname

    starts with

    drawable

    false

    Parameters

    Returns boolean

    boolean

substring

  • Extracts a section of text between two indices. Example: text='hello world', start=0, end=5 → 'hello'

    group

    transform

    shortname

    substring

    drawable

    false

    Parameters

    Returns string

    extracted text

toLowerCase

  • toLowerCase(inputs: TextDto): string
  • Converts text to lowercase. Example: text='HELLO' → 'hello'

    group

    transform

    shortname

    to lower case

    drawable

    false

    Parameters

    Returns string

    lowercase text

toLowerCaseFirst

  • toLowerCaseFirst(inputs: TextDto): string
  • Lowercases the first character of text. Example: text='Hello World' → 'hello World'

    group

    transform

    shortname

    uncapitalize first

    drawable

    false

    Parameters

    Returns string

    text with first character lowercase

toString

  • Transform any item to text

    group

    transform

    shortname

    to string

    drawable

    false

    Type parameters

    • T

    Parameters

    Returns string

    text

toStringEach

  • Transform each item in list to text

    group

    transform

    shortname

    to strings

    drawable

    false

    Type parameters

    • T

    Parameters

    Returns string[]

    texts

toUpperCase

  • toUpperCase(inputs: TextDto): string
  • Converts text to uppercase. Example: text='hello' → 'HELLO'

    group

    transform

    shortname

    to upper case

    drawable

    false

    Parameters

    Returns string

    uppercase text

toUpperCaseFirst

  • toUpperCaseFirst(inputs: TextDto): string
  • Capitalizes the first character of text. Example: text='hello world' → 'Hello world'

    group

    transform

    shortname

    capitalize first

    drawable

    false

    Parameters

    Returns string

    text with first character uppercase

trim

  • Removes whitespace from both ends of text. Example: text=' hello ' → 'hello'

    group

    transform

    shortname

    trim

    drawable

    false

    Parameters

    Returns string

    trimmed text

trimEnd

  • Removes whitespace from the end of text. Example: text=' hello ' → ' hello'

    group

    transform

    shortname

    trim end

    drawable

    false

    Parameters

    Returns string

    trimmed text

trimStart

  • trimStart(inputs: TextDto): string
  • Removes whitespace from the start of text. Example: text=' hello ' → 'hello '

    group

    transform

    shortname

    trim start

    drawable

    false

    Parameters

    Returns string

    trimmed text

vectorChar

  • 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}

    group

    vector

    shortname

    vector char

    drawable

    false

    Parameters

    Returns VectorCharData

    width, height and segments as json

vectorText

  • 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}]

    group

    vector

    shortname

    vector text

    drawable

    false

    Parameters

    Returns VectorTextData[]

    segments

Generated using TypeDoc