Re: zapping gremlins
Re: zapping gremlins
- Subject: Re: zapping gremlins
- From: Michelle Steiner <email@hidden>
- Date: Tue, 17 Apr 2001 09:21:53 -0700
On 4/17/01 8:49 AM, Erik Ness <email@hidden> wrote:
>
Anyone have a boilerplate AS they can share for removing bad
>
characters (control characters, primarily) from a block of text?
on stripGremlins(instring)
copy instring to testString
set tid to text item delimiters
repeat with I from 0 to 26
set charToStrip to ASCII character of I
set text item delimiters to charToStrip
set testList to text items of instring
set text item delimiters to ""
set instring to testList as text
end repeat
set text item delimiters to tid
return instring
end stripGremlins
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------