Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement