我不确定clojure阅读器是否可以信任用户输入,因此您也可以在读取之前进行检查: (defn str->int [str] (if (re-matches (re-pattern "\\d+") str) (read-string str))).
確定! 回上一頁