IndexOf

 

 

 

IndexOf

 

Description

Returns the 0-based index of a character string within another character string.

 

Arguments

1.IndexOf - Name of the Macro.

2.Base String - The complete string of characters that will be searched.

3.Pattern[, PatternN]  - The (0-based).  Position must be >= 0.  This is basically the number of characters to skip over.

 

Examples

<IndexOf|The quick brown fox jumps over the lazy dog|fox>

Returns 16.

 

<IndexOf|The quick brown fox jumps over the lazy dog|fox|dog|brown|quick>

Returns 4 which is the location of quick - the earliest occurrence of the words fox, dog, brown, and quick.

 

Notes

If no match is found the IndexOf macro will return -1.  Any other value is the 0-based index of the first match detected.

 


Copyright © 2024 pasUNITY, Inc.

 

Send comments on this topic.



Created with an evaluation copy of HelpSmith.
To remove this notice, you should purchase the full version of the product.