diff --git a/src/core/CCString.ml b/src/core/CCString.ml index a651349b..84991e40 100644 --- a/src/core/CCString.ml +++ b/src/core/CCString.ml @@ -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")