aboutsummaryrefslogtreecommitdiff
path: root/src/util.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.lisp')
-rw-r--r--src/util.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.lisp b/src/util.lisp
index fea974d..ec2f249 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -333,6 +333,11 @@ expansion as a starting point for your own DEFPACKAGE form for your consfig."
else do (princ #\: s)
(loop-finish)))))))))
+(defun try-parse-number (string &rest args &key &allow-other-keys)
+ (and string
+ (handler-case (apply #'parse-number string args)
+ (parse-error () string))))
+
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-constant +alphanum+
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"