Skip to main content

String Op

Runs on: Shared — pure logic, runs on the Community backend or inside a chatbox overlay.

The String Op node applies a text transformation to an input string. It supports a wide range of operations, from simple formatting like making text uppercase to more advanced manipulations like find-and-replace and regex patterns. This is your go-to node for any kind of text processing within a flow.

Inputs​

NameTypeDescription
InputstringThe text to transform
ArgstringAn argument used by certain operations (e.g., the replacement text for replace, the search term for indexOf)

Outputs​

NameTypeDescription
Resultstring or numberThe transformed result. Most operations return a string, but length and indexOf return a number.

Configuration​

  • Operation: The transformation to apply. Options:
    • uppercase -- Converts all characters to uppercase
    • lowercase -- Converts all characters to lowercase
    • trim -- Removes whitespace from the beginning and end
    • concat -- Appends the Arg value to the end of the input
    • replace -- Replaces the first occurrence of Arg in the input (use regex replace for advanced patterns)
    • split -- Splits the string by the Arg delimiter and returns an array
    • length -- Returns the number of characters in the input
    • indexOf -- Returns the position of Arg within the input, or -1 if not found
    • slice -- Extracts a portion of the string using Arg as the start and end positions (e.g., "0,5")
    • regex replace -- Replaces text matching a regex pattern defined in Arg

Example​

You want to display a viewer's username in all caps in a custom alert. Connect the trigger's username output to the Input handle, set the operation to uppercase, and connect the Result to your alert's display name field. "nightbot" becomes "NIGHTBOT".