WMLScript charAt() function
The charAt() function returns the character at the specified position.
Syntax
n = String.charAt(string, index)
Component | Description |
---|---|
n | The string returned from the function. |
string | A string. |
index | Specify a number for the index position in the string. |
Example
var a = String.charAt("world",2); var b = String.charAt("world",0); var c = String.charAt("world",10);
Result
a = "r" b = "w" c = ""