> what is a *fast* way to strip chars unwanted from a string?

The replies so far assume you have an explicit list of the unwanted chars.

If instead you are starting with a list of conforming chars, and you 
want to remove anything that does not conform, you need a slightly 
different approach.

One way is to use 'trim twice:

    good-chars: " abcdefhgijklmnopqrstuvwxyz"
    target: "this: is a string!"
    trim/with target trim/with copy target good-chars
    == "this is a string"

Other ways include using parse with the complement of a bit set. But 
that  may not be forward compatible with R3

Sunanda.
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to