Description
F$EXTRACT() is used to extract a specified substring from an EASI string.
Call Signature
string F$EXTRACT ( string src_string, int first_char, int num_char )
Return Value
string
The requested substring to extract is returned. If the requested substring extends beyond the end of the source string, the returned string will be reduced to the number of available characters beyond the first character. If the first character is beyond the end of the source string, then an empty string will be returned.
Arguments
string src_string:
String expression to extract substring from.
int first_char:
Number of the first character of the substring. The first character in the string would be `1'.
int num_char:
The number of characters to extract.
Example
The following commands fetch the output of the F$VERSION function and break out the three fields to print them separately.
local string a a = F$VERSION print "Version:"+F$EXTRACT(a,1,8) \ rem V5.1 print "System:"+F$EXTRACT(a,9,12) \ rem Iris print "Operating System:"+F$EXTRACT(a,21,4) \ rem UNIX
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.