Skip to content

Instantly share code, notes, and snippets.

@borkdude
Created May 21, 2012 21:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borkdude/2764700 to your computer and use it in GitHub Desktop.
Save borkdude/2764700 to your computer and use it in GitHub Desktop.
Clojure parse-int function
(defn parse-int [number-string]
(try (Integer/parseInt number-string)
(catch Exception e nil)))
@tanrax
Copy link

tanrax commented Mar 8, 2020

For large numbers

(read-string "2166957614")
;; -> 2166957614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment