git.fiddlerwoaroof.com
Browse code

Reformat package, fix string-utils:split

fiddlerwoaroof authored on 09/06/2017 04:14:10
Showing 2 changed files
... ...
@@ -18,5 +18,5 @@
18 18
            #:setfs #:prog1-let #:prog1-bind #:if-let* #:with #:aconsf
19 19
            #:ensure-list #:pick #:vector-destructuring-bind #:with-accessors*
20 20
            #:skip-values #:limit-values #:substitute-values #:op #:pick/r
21
-           #:pick-error))
21
+           #:pick-error)) 
22 22
 
... ...
@@ -90,13 +90,16 @@
90 90
 	(loop 
91 91
 	   for end-pos = (find-pos start-pos)
92 92
 	   while end-pos 
93
-	   for num-parts from 1 below count
93
+	   for num-parts from 0 to count
94 94
 	   do
95 95
 	     (vector-push (subseq string start-pos end-pos) parts)
96 96
 	     (setf start-pos (1+ end-pos))
97 97
 	   finally
98 98
 	     (when (< start-pos (length string))
99 99
 	       (vector-push (subseq string start-pos)
100
+			    parts))
101
+	     (when (eql divider (aref string (1- (length string))))
102
+	       (vector-push (make-string 0)
100 103
 			    parts)))))))
101 104
 
102 105
 (defmacro twice (&body body)