STD.Str.Extract( source, instance )
STD.Uni.Extract( source, instance )
source | A string containing a comma-delimited list of data. |
instance | An integer specifying the ordinal position of the data item within the source to return. |
Return: | Extract returns either a STRING or UNICODE value, as appropriate. |
The Extract function returns the data at the ordinal position specified by the instance within the comma-delimited source string.
Example:
//all these examples result in 'Success' A := IF(STD.Str.Extract('AB,CD,,G,E',0) = '', 'Success', 'Failure -1'); B := IF(STD.Str.Extract('AB,CD,,G,E',1) = 'AB', 'Success', 'Failure -2'); C := IF(STD.Str.Extract('AB,CD,,G,E',2) = 'CD', 'Success', 'Failure -3'); D := IF(STD.Str.Extract('AB,CD,,G,E',3) = '', 'Success', 'Failure -4'); E := IF(STD.Str.Extract('AB,CD,,G,E',4) = 'G', 'Success', 'Failure -5'); F := IF(STD.Str.Extract('AB,CD,,G,E',5) = 'E', 'Success', 'Failure -6'); G := IF(STD.Str.Extract('AB,CD,,G,E',6) = '', 'Success', 'Failure -7');