Find Function


This function returns an integer value corresponding to the offset of the specified substring in the source string. The offset of the first character in the source string is zero. If the substring is not found, the function returns -1.


result = Find(input_string, search_string)
result = Find(input_string, search_string, offset)
result = Find(input_string, search_string, options)
result = Find(input_string, search_string, offset, options)

If the offset does not lie within the boundaries of the source string, the result -1.
By default, the matching is case sensitive. The strings "London" and "LONDON", for example, would not produce a match. This can be overridden by specifying the NOCASE option (see below).
The source string is scanned from left to right. If the substring appears more than once in the source string, the function will always return the offset of the first occurrence.



A string expression to be searched for the specified substring.


A string expression defining the substring to be located in the source string.


An integer expression from which the substring is to be located.


Available options are:

NOCASE  Performs a case insensitive search 


integer iPos;

iPos = FIND("Find a word in this string", "A Word", nocase);
LOG "Position = " + ToString(iPos);


Position = 5

Go back to the Learning center:

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