function | since v0.0-3255 | Edit |
(char-code c)
Convert char to int
(defn char-code
[c]
(cond
(number? c) c
(and (string? c) (== (.-length c) 1)) (.charCodeAt c 0)
:else (throw (js/Error. "Argument to char must be a character or number"))))