substr (string, start_char, length)
A string.
The position number of the first character of the substring.
The length of the substring.
This function returns a substring of the input string starting at the start_char position and running for length characters. The first character in the string is numbered zero. If start_char is greater than the length of the string, the function returns an empty string. If start_char is negative, it is indexed from the end of the string. If it is negative and greater than the length of the string, it is treated as zero—the beginning of the string.
If there are fewer characters than length in the string, or if length is -1, then the substring contains all characters from start_char to the end of the string.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.