Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chrtran for a phrase
Message
 
 
À
16/02/2005 11:35:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00987482
Message ID:
00987494
Vues:
28
>Hi. Looking for a function (like chartran) that will eliminate a specified word from a field value without affecting same characters in other words therein.
>Is there a strtran()?
>
>Randy

Like Sylvain said, but you need to use spaces as well:

lcString = [help helpful whelp]

where you want to remove the exact word "help":

? alltrim(STRTRAN([ ] + lcString + [ ], [ help ], [ ]))

Something more reliable would be the use of GETWORDCOUNT and GETWORDNUM in a loop to parse through and rebuild the string
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform