extract
Last updated
Extract a specific length of characters from a string of text.
type
The part of the string to extract characters from.
Text
-
Left , Middle , Right
Yes
text
The string of text to extract from.
Text
-
-
Yes
length
The length of characters to extract.
Number
-
-
Yes
start
The index to start extracting from.
Number
-
-
Yes (Applicable for type โMiddleโ only.)
Returns the extracted string of text.
String/Text
In this example, we will extract a part of a text using extract function.
Drag a button component into the canvas and open the Action tab. Select the press event of the button.
Add Log.write function and add a subflow on it's value, then put Text.extract inside it and fill type param with Left and the text param with Hello, ไธ็๐! and length param with 5.

Add Log.write function and add a subflow on it's value, then put Text.extract inside it and fill type param with Right and the text param with Hello, ไธ็๐! and length param with 6.

Add Log.write function and add a subflow on it's value, then put Text.extract inside it and fill type param with Middle and the text param with Hello, ไธ็๐! and length param with 5 and start param with 7.

The console on preview will show us the formatted text value Hello, ไธ็๐! & ไธ็๐!.

Last updated