Wednesday, October 12, 2011

Clojure - Printing special characters " \ / { } # ' $

I was playing around with Clojure and I had a problem printing out the following special characters:
" \ / { } # ' $

I uploaded the solution here: https://github.com/ryanteo/clojure-utilities

You can define a string containing all these special characters, then you can access each character by its index as a string in Clojure is stored as a sequence.
Not sure why this works (no time to read the documentation), but it's my hack-around.

As a side note, I've attached this reference for printing special characters in other languages.

Reference:

No comments:

Post a Comment