char

functionsince v0.0-1798 clojure.core/charEdit
(char x)

Details:

Converts a number x to a character using String.fromCharCode(x) from JavaScript.


Examples:

(char 81)
;;=> "Q"

(char "Q")
;;=> "Q"

(char "foo")
;; Error: Argument to char must be a character or number

Source docstring:
Coerce to char
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn char
  [x]
  (cond
    (number? x) (.fromCharCode js/String x)
    (and (string? x) (== (.-length x) 1)) x
    :else (throw (js/Error. "Argument to char must be a character or number"))))