remove custom split_on_char post 4.04

This commit is contained in:
Simon Cruanes 2022-02-17 14:37:14 -05:00
parent 01295a71fd
commit 6717d03a35
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -469,9 +469,14 @@ module Split = struct
*)
end
[@@@ifge 4.04]
[@@@else_]
let split_on_char c s: _ list =
Split.list_cpy ~drop:Split.no_drop ~by:(String.make 1 c) s
[@@@endif]
(*$= & ~printer:Q.Print.(list string)
["a"; "few"; "words"; "from"; "our"; "sponsors"] \
(split_on_char ' ' "a few words from our sponsors")