getFindCount

From RPTools Wiki
Jump to navigation Jump to search

Function getFindCount

Returns the number of times that strfind() was able to match the input string.

Usage

[h: count = getFindCount(id)]

The id is the id value returned by strfind().

Example

[h: id = strfind("this is a test", "(\\S+)\\s+(\\S+)\\s*")]
[r: getFindCount(id)]

Returns 2.