Development tools : Global functions : String category : subString
  
subString
Description
Returns a portion of a string.
Usage
Client side: Y
Server side: Y
Syntax
String subString(String string, Integer start, Integer end)
Arguments
string
The String to be manipulated. The argument can be any string.
start
The beginning index, inclusive. Index starting from 0. The argument can be integer from 0 to length of string.
end
The ending index, exclusive. The arugment can be integer from start to length of string.
Return
Returns the specified substring from start to end in string.
Exception
IndexOutOfBoundsException
For server side execution, if the start is negative, or end is larger than the length of this String object, or start is larger than end. For example, subString("hamburger", 10, 2) will cause IndexOutOfBoundsException thrown.
For client side execution, undefined will be returned if the start is negative, or end is larger than the length of this String object, or start is larger than end.
Example
subString("hamburger", 4, 8)
returns "urge".
Go up to
String category