July 1, 2000 - WMLScript's String Library
July 1, 2000|
WMLScript's String Library
Tips: July 2000
Yehuda Shiran, Ph.D.
The concept of elements is unique to WMLScript. You can split a string to its elements (separated by a user-given character), replace elements with other elements, remove them, insert new ones, etc. Go to Column 63, The String Library, to see a detailed definition of each function, including examples. Here is the definition of the
This function first separates the given string into elements according to the specified separator, and then returns the element with the given index. If the index is negative, the first element is returned. If it is out of range, the last element is returned. If the string is empty, an empty string is returned. If the separator is empty,
invalidis returned. If the index is floating-point,
Float.int()is used to convert it to an integer. No case folding is done.
|Syntax||elementAt(string, index, separator)|
|Parameters||string = String, index = Integer, separator = String|
|Returns||String or |