Extract Function

Description:

This function returns the portion of the source string identified by the specified offset and length.

Format:

result = EXTRACT (offset, length, string)

If the offset does not lie within the boundaries of the source string, the result is empty.
If the string identified by the offset and length overlaps the end of the source string, only the characters up to the end of the source string will be returned.

Parameter:

offset

An integer expression defining the offset in the source string of the first character that is to be extracted. The first character of the source string is at offset zero.

length

An integer expression defining the number of characters to extract from the substring. -1 to extract all characters until the end of the source string.

string

A string expression from which the substring is to be extracted.

Example:

string szExtractString;

szExtractString = EXTRACT (0, 13, "Extract first characters");
LOG "szExtractString = " + szExtractString;

szExtractString = EXTRACT (8, -1, "Extract until the end");
LOG "szExtractString = " + szExtractString;

Output:

szExtractString = Extract first
szExtractString = until the end





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap