Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtran() / Stuff() / Padr() ???
Message
De
06/08/1999 00:33:42
 
 
À
05/08/1999 10:32:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00249697
Message ID:
00250541
Vues:
19
>Hi Paul,
>
>>Not that it would really matter here, but chrtran() is faster than strtran().
>
>Thanks! I've never seen chrtran, is it any different from strtran?

Yeah, CHRTRAN() is cool.

You can use it for lots of one line string functions like

* Clean the dashes, slashes and parens out of a phone number

lcPHoneNumber = "(512)/255-1234"

lcPhoneNumber = CHRTRAN(lcPhoneNumber, "()/-","")

?lcPhoneNumber = 5122551234

or

* Determine if a string of characters contains any numeric characters

?lcNumber = STRTRAN(lcNumber,"1234567890","")
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform