Information générale
Catégorie:
Codage, syntaxe et commandes
You know how it is Thom, the more you use a specific command/function the more likely you will use it again. Because substr is used in many diferent situations a coder will likely use substr instead of the more appropriate left function. The same could be said for the right function, the substr function is probably used more often than the right (no pun) function.
This same principle is common in speach as well, how often have you heard someone use a word or phrase with which they are more familiar, than one which they are less familiar? For a while, in the near VFP past, the expression "Cool" was used excessively, instead of more accurate but less recognizable phrasing.
Glenn
>David,
>
>>>They both resolve to extremely fast string manipulation routines in C++. The only speed difference you should be able to detect is that left() only takes two arguments vs the three for substr(). But I seriously doubt you'll see much performance differences.
>
>
>That's what I'd figured. So, I still can't understand why so many people use the SUBSTR() version. Oh well, it least I'm not missing anything.
>
>Thanks,
>Thom
Précédent
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