Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for the string function
Message
From
07/01/1999 19:45:14
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00173714
Message ID:
00173869
Views:
30
Would you use such function if the table is big?

Vlad

>At( Space(1)+"WASH"+Space(1), Space(1)+Chrtran(Description,ChrTran(Upper(Description),"ABCDEFGHIJKLMNOPQRSTUVWXYZ",""),Space(255)) + Space(1) ) > 0
>
>The inner Chrtran returns a string that contains all characters that are not the letters A-Z. This is used in the outer ChrTran to remove all thos characters from the description field and replace it with a blank. The intermediate result would for example be:
>
>"Hello World! 123... Hi" -> " Hello World Hi "
>
>All special characters have been replaced by blanks and a blank has been added on both sides. Now you can search for a word by adding a blank to both side of the search string. Use ATC if you need case insensitivity.
>
>Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform