> ... speed differences between STRTRAN() and CHRTRAN(). CHRTRAN()ing a
> character into a space is much slower than STRTRAN()ing a character into a
> space. I thought this was a clear bug, but I found out that the reason for
> this was that CHRTRAN() was not designed to change the length of the
> string, although it could, where STRTRAN() was coded to allow for this
> likelihood.
Garret, I think you mean CHRTRAN()ing characters 'away' (to nothing) rather than into different characters. I stumbled across this one myself and solved it by CHRTRAN()ing all but the first of the characters to be removed into the first character and then STRTRAN()ing that character to nothing. This was before I found the Fox newsgroups on Usenet or UT, of course. ;-) Recently I revisited the issue because I was looking at some very old library code and I wondered if it still applies ... But it seems that in VFP8 there is nary a difference between CHRTRAN() and STRTRAN() for removing characters.
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