On Sun, 19 Dec 2004, 13:03 GMT+01 Ruud H.G. van Tol wrote:
Toen wij Robert Allerstorfer kietelden, kwam er dit uit:
# insert by roal, to replace all "_" by " ":
'xlt' is far more efficient for single-character replacements.
A simple one-liner will be handled by mode-0.
xlt is also handy for character set conversions.
Like sed y/$ascii/$charset/.
The reason why I use your snr instead of your xlt in SoftlabsAV simply
is that xlt is not (yet) integrated. I integrated snr at a time when
xlt has not been available (on 2004-04-11, as of release v0.6.7). The
purpose has been to lowercase a string, as a replacement for
sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
which I have been using before.
snr_Search_Len = '1'
snr_Replace_Len = '1'
These are set by snr itself.
Since, so far, I have been using your snr for lowercasing (take a look
into my inc/av_lc.inc), the length of the string to be searched for
and of the string to be replaced by is known and always constant -
namely '1'. So there was no need to determine the same length 52
times. Just a performance enhancement.
However I realize that - now where you released xlt 0.99a as part of
your fabolous "just procmail" collection 1.20 (BTW, thanks for the new
package!) - xlt may be more efficient. Is this true for all cases
where snr_Search_Len == snr_Replace_Len?
rob.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail