improved split-string

master
Avril 4 years ago
parent b9836a7f26
commit 212e5f76e1
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -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)))

Loading…
Cancel
Save