diff options
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.lisp b/src/util.lisp index d123e8c..e20b113 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -72,6 +72,11 @@ (defun unwords (words) (format nil "~{~A~^ ~}" words)) +(defun strip-prefix (prefix string) + "If STRING is prefixed by PREFIX, return the rest of STRING, +otherwise return NIL." + (nth-value 1 (starts-with-subseq prefix string :return-suffix t))) + (defun memstr= (string list) (member string list :test #'string=)) |