Skip to content

Commit 052e731

Browse files
committed
CLJS-3360: Update clojure.string/split docstring regarding trailing empty parts
1 parent 0b621e2 commit 052e731

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/cljs/clojure/string.cljs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166

167167
(defn split
168168
"Splits string on a regular expression. Optional argument limit is
169-
the maximum number of splits. Not lazy. Returns vector of the splits."
169+
the maximum number of parts. Not lazy. Returns vector of the parts.
170+
Trailing empty strings are not returned - pass limit of -1 to return all."
170171
([s re]
171172
(split s re 0))
172173
([s re limit]
@@ -189,7 +190,7 @@
189190
(conj parts s))))))))))
190191

191192
(defn split-lines
192-
"Splits s on \\n or \\r\\n."
193+
"Splits s on \\n or \\r\\n. Trailing empty lines are not returned."
193194
[s]
194195
(split s #"\n|\r\n"))
195196

0 commit comments

Comments
 (0)