Just as I pointed out in
TIP of the Day: GETWORDNUM Thread #
773431 Message #
773431 how valuable the GETWORDNUM function is, I feel there is a need for the GETWORDPOS function.
GETWORDPOS(cSearchWord, cString, cDelimiter)
This function should return the number of the word in cString which matches cSearchWord. At default a words are seperated by spaces, tabs, carriage return or linefeeds (As with GETWORDNUM). You can change this by specifying cDelimiter
Examples:
GETWORDPOS("Walter","Hello my name is Walter")
should return 5 as walter is the 5th word in the string.
GETWORDPOS("BIKE","TRACTOR|PLANE|CAR|BIKE|BOAT","|")
should return 4 as BIKE is the 4th word where the words are delimited with a |
If cSearchWord is not found, the function should return 0
Well, what do you think ?
Walter,