convert to lower ascii 128?
alex at tweedly.net
Thu Feb 5 16:41:12 CST 2009
Chipp Walters wrote:
> Thanks for the tests. Illuminating again. You are correct, I was actually
> running my tests on shorter strings, but hundreds of them in sequence.
So it might be useful for you to try Ben's fourth (i.e. array-based)
method, but do the set-up once using a script-local array.
If it's only a small number of hundreds of them, it may still not be
worth the setup overhead - but may be a faster option in some cases.
set the caseSensitive to true
-- set up array to map characters we want to retain to themselves
put empty into asciiscrub
repeat with i = 32 to 127
put it into asciiscrub[it]
function asciiScrub4 pText
-- filter the string through the array set up above
put empty into t
repeat for each char c in pText
put asciiscrub[c] after t
More information about the use-livecode