getFindCount: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function getFindCount== {{ProposedChange}} Returns the number of times that strfind() was able to match the input string. ===Usage=== <source lang="mtmacro...)
 
Line 1: Line 1:
==Function getFindCount==
==Function getFindCount==
{{ProposedChange}}
 
Returns the number of times that [[Macros:Functions:strfind| strfind()]] was able to match the input string.
Returns the number of times that [[Macros:Functions:strfind| strfind()]] was able to match the input string.



Revision as of 14:58, 6 December 2008

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.