|
Newsletters
|
|
|
|
|
WMLScript Reference
WMLScript Reference
WMLScript > String > charAt()
charAt() - The charAt Function
Usage: charAt(string, index)
Description: Returns a new string of length one containing the character at the specified index of the given string.
If the index is of type floating-point, Float.int() is first used to calculate the actual integer index.
Example:var a = "My name is Joe";
var b = String.charAt(a, 0); // b = "M"
var c = String.charAt(a, 100); // c = ""
var d = String.charAt(34, 0); // d = "3"
var e = String.charAt(a, "first"); // e = invalid
Bookmark this page
|
|