Browse code
Reformat package, fix string-utils:split
Showing 2 changed files
... | ... |
@@ -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) |