Overview Module Function Class Tea 3.2.4 Reference Documentation
© 2009 PDM&FC

Function str-substring

str-substring aString startIndex [endIndex]

Extracts a substring from a string.

Parameters:
aString - A string object.
startIndex - Integer representing the index of the first character in aString that is part of the substring. The first character is at index 0, the next at index 1, and so on, as for array indexing.
endIndex - Integer representing the index of the character following the last character in aString that is part of the substring. If it is not specified it is taken to refer to the end of the string.
Returns:
A new string object containing the substring of aString between startIndex and endIndex.

If endIndex precedes startIndex then an empty string is returned.

If endIndex is beyond the end of aString then it is taken to refer to the end of the string.


Overview Module Function Class Tea 3.2.4 Reference Documentation
© 2009 PDM&FC
Report a bug or request new features
© 2009