@veer66 Can't you just take advantage of the Unicode number mappings?

@loke Like this?

(defn num-ch-tha->ara [c]
(if (and (<= (.compareTo \๐ c) 0)
(>= (.compareTo \๙ c) 0))
(-> c
(- 3616)

@veer66 No. I mean to use the Unicode API to get the numerical value of a character. I don't know the Clojure API, but in SBCL I can use (sb-unicode:numeric-value #\๑) which results in 1.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!