Text Splitting

Text splitting functions are useful for advanced codes that deal with multiple user arguments, or even adjusting function outputs (for advanced users). This wiki includes information on how to use these functions.

Functions

$textSplit[]

$textSplit[text;splitter]

Splits the text into sections by a splitter.

$splitText[]

$splitText[index]

Retrieves a value from $textSplit.

🧙‍♂️ You can also use $splitText[>] to retrieve the last value of the split.

$getTextSplitLength

$getTextSplitLength

Returns how many splits there are in $textSplit. Here's an example:

$textSplit[hello world | hello planet | hello earth;|]
$getTextSplitLength

example

$getTextSplitIndex

$getTextSplitIndex

Retrieves the position of the provided value in $textSplit. Returns -1 if it couldn't find the value. Here's an example:

$textSplit[Cake-Bread;-]
$getTextSplitIndex[$message]

​​image​

$removeSplitTextElement[]

$removeSplitTextElement[index]

Removes a element from $splitText. Here's an example:

$textSplit[hello world | hello planet | hello earth;|]
$removeSplitTextElement[1]
1: $splitText[1]
2: $splitText[2]

example

$joinSplitText

$joinSplitText[splitter]

Joins $textSplit values with provided 'splitter'. Here's a example:

$textSplit[hello world | hello planet | hello earth;|]
$joinSplitText[+]

example

Examples

Example #1

$textSplit[hello world | hello planet | hello earth;|]
1: $splitText[1]
2: $splitText[2]
3: $splitText[3]

example

Example #2

$textSplit[text1-text2-text3-text4;-]
1: $splitText[1]
2: $splitText[2]
3: $splitText[3]
4: $splitText[4]
Length: $getTextSplitLength

example