WMLScript find() Function
The find() function returns the position of the substring in the string.
Syntax
n = String.find(string, substring)
Component | Description |
---|---|
n | The integer returned by the function. |
string | The string to be searched. |
substring | The string value to be searched in the string. |
Example
var a = String.find("world","rl"); var b = String.find("world","hi"); var c = String.find("world","wo");
Result
a = 2 b = -1 c = 0