Add split-lines arity to echo clojure.string/split limit arity

Description

Logged per https://ask.clojure.org/index.php/9325/add-limit-third-argument-of-split-to-split-lines

The signature for clojure.string function split-lines is:

And the signature for split is:

I think it would be nice to add this overload that accepts a limit to split-lines as well, just as it is for split:

My use case is often to split on lines but not to ignore trailing newlines. This requires passing -1 to limit. In those cases, I always need to switch back to using split and re-implement split-lines.

Also see:

Environment

None

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Triaged

Patch

None

Affects versions

Priority

Major
Configure