Last active
March 21, 2016 14:09
-
-
Save apmaricich/6f569aa5780a77d96180 to your computer and use it in GitHub Desktop.
clj: convert a string to an int
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn str->int | |
| "Converts a string to an integer" | |
| [string] | |
| (Integer. (re-find #"\d+" string))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment