From 212e5f76e1683cd6297092b93a32452d2f12f347 Mon Sep 17 00:00:00 2001 From: Avril Date: Mon, 7 Jun 2021 15:23:26 +0100 Subject: [PATCH] improved split-string --- flan-utils.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flan-utils.lisp b/flan-utils.lisp index 139ea7a..a275290 100644 --- a/flan-utils.lisp +++ b/flan-utils.lisp @@ -589,6 +589,14 @@ (defun split-string (string &optional sep) "Split a string by this seperator (or `:whitespace', if not provided" (let* ((sep (or (switch sep + (#\Newline "[\\n\\f\\r]") + (#\Space " ") + (#\Backspace "\\b") + (#\Tab "\\t") + (#\Linefeed "\\n") + (#\Page "\\f") ; ??? + (#\Return "\\r") + ;(#\Rubout wtf even is this??? (nil "\\s") nil) (cl-ppcre:quote-meta-chars sep)))