Changing text properties in a field via the IDE

Quentin Long cubist at aol.com
Tue May 19 18:56:31 EDT 2020


While Bob Sneidar's function should do the job of scrubbing weird characters from text, am unsure why he felt the need to construct that massive pCustomList variable. Seems to me that it would be simpler, and perhaps quicker, to do this instead:
function cleanASCII2 DerASCII  put "" into DerRezult
  repeat for each char CC in DerASCII    put charToNum (CC) into Fred    if Fred > 31 and Fred < 127 then put CC after DerRezult -- the full range of ASCII values for printable characters  end repeat  return DerRezultend cleanASCII2
The above code is not tested in any way. It's clearly not to be trusted with Unicode text, so which might be why Sheidar felt the need to go thru a somewhat more complicated procedure…


More information about the use-livecode mailing list