Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching for the string function
Message
De
07/01/1999 19:45:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00173714
Message ID:
00173869
Vues:
31
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform