Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtran() / Stuff() / Padr() ???
Message
From
06/08/1999 00:33:42
 
 
To
05/08/1999 10:32:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249697
Message ID:
00250541
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform