convert to lower ascii 128?
Chipp Walters
chipp at chipp.com
Wed Feb 4 20:45:37 EST 2009
Interesting note: I found the following results:
function altAsciiScrub2 pText
put replacetext(pText,"[" & numToChar(129) & "-" & numToChar(255) &
"]","") into pText
put replacetext(pText,"[" & numToChar(1) & "-" & numToChar(31) & "]","")
into pText
return pText
end altAsciiScrub2
executed in 19 ticks on my QuadCore Vista 64 machine
function altAsciiScrub1 pText
repeat for each char c in pText
get charToNum(c)
if it > 128 or it < 32 then
next repeat
end if
put c after t
end repeat
return t
end altAsciiScrub1
executed in 17 ticks on my QuadCore Vista 64 machine
repeat for each is really fast.
That said, executing one replaceText versus a single "if it >128
(Devin, yours was much slower: 49 ticks)
More information about the use-livecode
mailing list