TeleFlow BasicScript Pos
From TeleFlow
(Difference between revisions)
Wikilib (Talk | contribs)
(New page: Returns the indexed position of a substring in a string, or –1 if the substring is not part of a string.<br> <br> ===Syntax=== :POS(<b><i>string</i></b>,<b><i>substring</i></b>)<br> :<b>...)
Next diff →
Current revision
Returns the indexed position of a substring in a string, or –1 if the substring is not part of a string.
Syntax
- POS(string,substring)
- string: a string value or variable.
- substring: the substring to search for in string.
Related Steps
Examples
BasicScript code |
Result
|
@A = "HELLO WORLD" @B = POS(@A,"WORLD") PRINT "@B" |
6 |
|
|
@A = "HELLO WORLD" @B = POS(@A,"AGAIN") PRINT "@B" |
-1 |
|
|
|
|
|
|
