extract
Description
Extract a specific length of characters from a string of text.
Input / Parameter
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.)
Output
Returns the extracted string of text.
String/Text
Example
In this example, we will extract a part of a text using extract function.
Steps
Drag a
buttoncomponent into the canvas and open theActiontab. Select thepressevent of the button.Add
Log.writefunction and add a subflow on it's value, then putText.extractinside it and fill type param withLeftand the text param withHello, ไธ็๐!and length param with5.
Add
Log.writefunction and add a subflow on it's value, then putText.extractinside it and fill type param withRightand the text param withHello, ไธ็๐!and length param with6.
Add
Log.writefunction and add a subflow on it's value, then putText.extractinside it and fill type param withMiddleand the text param withHello, ไธ็๐!and length param with5and start param with7.
Result
The console on preview will show us the formatted text value
Hello,ไธ็๐!&ไธ็๐!.
Links
Related Information
Last updated