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 | Specifies a number indicating the index position in a 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 = ""