Re: Nonprinting characters in string

2012-05-07 Thread DAemon
Ah, thanks. It just seemed like there should be something that did this! - D On Mon, May 7, 2012 at 7:38 PM, David Powell wrote: > > Clojure doesn't seem to explicitly escape non-printable characters in > String literals when you try to print them. > You could always do it yourself with somethi

Re: Nonprinting characters in string

2012-05-07 Thread David Powell
Clojure doesn't seem to explicitly escape non-printable characters in String literals when you try to print them. You could always do it yourself with something like: (require 'clojure.string) (defn escape-nonprintable [s] (clojure.string/join (map (fn [c] (if (Character/isISOControl c)