RunningShoes Library for WinRunner
Custom WinRunner Functions
A Random Collection of WinRunner Solutions
Creating DLLs for WinRunner
Find the index of any specified occurrence of a character in a string.
In WinRunner, it's easy to find the index of the first occurrence of a
character in a string:
If we need the position of, say, the 13th comma in a comma-delimited string, we have to put the index() statement in a loop, dropping the part of the string already searched with the previous index() statement.
The function IndexMulti() finds any specified occurrence of the character in a string in which the character appears multiple times:
# Find the position of the 13th comma.
The code for both versions is in a text file to avoid the format mangling that browsers tend to do to normal pages. View IndexMulti.txt.
Copyright R. E. Cook Consulting, 2000 - 2011.
The site is designed to look best when viewed with Internet Explorer 5.0 - 8.0. Results with other browsers will probably deviate from what is intended.
NOTE: This website refers to registered trademarks and service marks that are owned by other companies, including Mercury Interactive, WinRunner, TestDirector, TSL, Microsoft, Windows.