From 6717d03a3504482e66cd4343fda068df0eb8fca7 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 17 Feb 2022 14:37:14 -0500 Subject: [PATCH] remove custom split_on_char post 4.04 --- src/core/CCString.ml | 5 +++++ 1 file changed, 5 insertions(+) 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")