From c725543faa9a50fb8983a30bf6a3e572df54941e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 18 Apr 2017 21:23:18 +0200 Subject: [PATCH] add alias `CCString.split` (close #115) --- src/core/CCString.cppo.ml | 2 ++ src/core/CCString.mli | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/core/CCString.cppo.ml b/src/core/CCString.cppo.ml index 1f88b308..37b29b65 100644 --- a/src/core/CCString.cppo.ml +++ b/src/core/CCString.cppo.ml @@ -402,6 +402,8 @@ let split_on_char c s: _ list = s = split_on_char ' ' s |> String.concat " ") *) +let split = Split.list_cpy + let compare_versions a b = let of_int s = try Some (int_of_string s) with _ -> None in let rec cmp_rec a b = match a(), b() with diff --git a/src/core/CCString.mli b/src/core/CCString.mli index 137e6b10..bbf59ddc 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -499,6 +499,10 @@ val split_on_char : char -> string -> string list (** Split the string along the given char @since NEXT_RELEASE *) +val split : by:string -> string -> string list +(** Alias to {!Split.list_cpy} + @since NEXT_RELEASE *) + (** {2 Utils} *) val compare_versions : string -> string -> int