Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pickup words from a phrase
Message
De
20/07/2008 17:25:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01332487
Message ID:
01332657
Vues:
7
>I've found the problem:
>
>It was wrong:
>
>NewA = STRTRAN(lcFirstWord,rgA, "") && here I try to remove the first word
>
>The correct form is:
>
>NewA = STRTRAN(rgA,lcFirstWord, "") && here I try to remove the first word

I have no idea if it is relevant in your situation.............

this will get rid of ALL occurrences of the word, and all occurrences when it is contained in other words. If the first word is "this" and your string is "this is what thisform and allthisstuff contains" the result would be " is what form and allstuff contains"

If you want to prevent this behavior you should check out the StartOccurrence and NumberOfOccurrences options for STRTRAN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform