Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pickup words from a phrase
Message
From
20/07/2008 17:25:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01332487
Message ID:
01332657
Views:
6
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform