4. System Classes : StringObject Class : ExtractString Method
 
Share this page                  
ExtractString Method
The ExtractString method returns a section of a string, starting at the position specified in the startposition parameter and extending the number of characters specified in the length parameter into a new StringObject.
This method has the following syntax:
StringObject = StringObject.ExtractString([startposition = integer]
          [, length = integer])
This method has the following parameters:
startposition
Specifies the start position of the string
Default: 1
length
Specifies the length of the string
Default: end of string
In string objects, the characters are numbered from left to right, starting with number one. If the value of startposition is less than one, it is set to one. If the value of startposition plus length exceeds the length of the string, the method returns the end of the string object, starting at the value of startposition.