Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtran() / Stuff() / Padr() ???
Message
From
05/08/1999 21:38:23
 
 
To
05/08/1999 10:32:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249697
Message ID:
00250521
Views:
21
>Thanks! I've never seen chrtran, is it any different from strtran?

But I'm sure you've looked into help after you read my message! :) STRTRAN() replaces strings while CHRTRAN() replaces characters.

> Why is it faster?

Just think of how you would write these two functions and the answer is almost obvious. It's easier to look for characters into a string than to look for substrings. So, it is usually faster.

In fact, it's not mandatory faster in all cases. But it is much faster when you have to replace only one char with another one (mainly because the internal tests are simplier and because there is no need to copy any strings in order to obtain the result).

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform