WMLScript String Library
The String function library includes functions for text operations.
WMLScript String Library Functions
Function | Description |
---|---|
charAt() | Return the character at the specified position. |
compare() | Compare two strings and return a value representing the comparison result. |
elementAt() | Divide the string into elements and return a specified element. |
elements() | Return the number of times a specified value appears in the string. |
find() | Return the position of the substring in the string. |
format() | Format a value. |
insertAt() | Divide the string into elements and insert a substring at a specified index. |
isEmpty() | Check if the string is empty. |
length() | Return the length of the string. |
removeAt() | Divide the string into elements and delete a specified element. |
replace() | Replace a part of the string with a new string. |
replaceAt() | Divide the string into elements and replace a specified element. |
squeeze() | Compress all consecutive spaces in the string into a single space. |
subString() | Return the specified part of the string. |
toString() | Convert a value to a string. |
trim() | Return the string after removing leading and trailing spaces. |