Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wishlist new GETWORDPOS function
Message
De
03/04/2003 03:23:44
Walter Meester
HoogkarspelPays-Bas
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Wishlist new GETWORDPOS function
Divers
Thread ID:
00773434
Message ID:
00773434
Vues:
71
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,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform