Strings library

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > ST language > Embedded functions >

Strings library

Previous pageReturn to chapter overviewNext page

stringsequals(Input1, Input) - compare two strings in Inputs and if there are equals it returns true.

 

stringtodouble(Input) - converts Input’s string value into double value.

 

doubletostring(Input) -converts Input’s double value into string value.

 

stringtoint(Input) - converts Input’s string value into integer value.

 

inttostring(Input) - converts Input’s integer value into string value.

 

substring(Input1, Input2, Input3) - used to cut begin and end of Input1’s string value by the № of characters defined in Input2 and Input3.

 

cutbeginstring(Input1, Input2) - used to cut begin of Input1’s string value by the № of characters defined in Input2.

 

cutendstring(Input1, Input2) - used to cut end of Input1’s string value by the № of characters defined in Input2.

 

split(Input1, Input2, Input3) - used to split string in Input1 to string array. Input2 contains split regular expression; Input3 contains number of elements in array (if this number greater then number of elements that we get during operation, they will be filled by “”)

 

stringlength(Input) - get Input’s string value length.

 

Example:

split(“hello;world”, “;”, 3);

Response:

string strarr[3] = ["hello", "world", “”];

 

Other Example:

string str = substring("Hello world", 2, 5);

print(str);

Response:

str ="llo";