I think the last test should be: (pass-if "string-split-substring - non-empty, trailing delimiters" (equal? (string-split-substring "barfoo" "foo") (list "bar" "")))) And isn't it more efficient to use substring/shared instead of substring? On Sun, 13 Feb 2022 at 03:06, Vijay Marupudi wrote: > Hello all, > > I have added a function named `string-split-substring' to the (ice-9 > string-fun) module. It acts like `string-split', but taking a substring > instead. It works like this > > (string-replace-substring "item-1::item-2::item-3::item-4" "::") > => ("item-1" "item-2" "item-3" "item-4") > > The tests include all the edge cases in the tests for string-split, and > the behavior matches it exactly. > > Documentation is also included in the patch. > > I have found myself making and using this function numerous times, and > judging by IRC, others find it useful as well. The patch is attached. > > ~ Vijay > >