chickadee » nutils » split-str-at-char

split-str-at-charprocedure
  • in - STR - string to split
  • in - SCHARS - string containing characters where string string should be split.
  • in - KEEP - boolean, default #f. When #t, SCHARS are retained in result.
  • returns: list of strings
 (import nutils)
 (define str "xyzAbcdeabcdefghijAbcde")
 (split-str-at-char str "Ad") ;; => ("xyz" "bc" "eabc" "efghij" "bc" "e")
 (split-str-at-char str "Ad" #t) ;; => ("xyz" "Abc" "deabc" "defghij" "Abc" "de")