Text (String) Methods

The following methods are supported for use with String objects.

Method Description
Properties
length Returns the length of a string.
Methods
charAt(index) Returns the character at the specified zero-based index.
indexOf(str[,fromIndex]) Returns the position of the first found occurrence of a specified value in a string.
lastIndexOf(str[,fromIndex]) Returns the position of the last found occurrence of a specified value in a string.
replace() Searches for a match between a substring (or regular expression) and a string, and replaces the matched substring with a new substring.
slice() Extracts a part of a string and returns a new string.
substr() Extracts the characters from a string, beginning at a specified start position, and through the specified number of characters.
substring() Extracts the characters from a string, between two specified indices.
toLowerCase() Converts a string to lowercase letters.
toUpperCase() Converts a string to uppercase letters.