Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtran() / Stuff() / Padr() ???
Message
De
05/08/1999 21:38:23
 
 
À
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:
00250521
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform