libs: make splitString also split last separator (#23851)
* libs: make splitString also split last separator * libs: add tests for splitStrings
This commit is contained in:
@@ -291,7 +291,7 @@ rec {
|
||||
|
||||
recurse = index: startAt:
|
||||
let cutUntil = i: [(substring startAt (i - startAt) s)]; in
|
||||
if index < lastSearch then
|
||||
if index <= lastSearch then
|
||||
if startWithSep index then
|
||||
let restartAt = index + sepLen; in
|
||||
cutUntil index ++ recurse restartAt restartAt
|
||||
|
||||
Reference in New Issue
Block a user