From 33c93006b7685092b5239ea001058578fac3552f Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Tue, 16 Oct 2018 01:28:36 +0200 Subject: [clib] Deprecate string functions available in OCaml 4.05 - `CString.strip -> String.trim` - `CString.split -> String.split_on_char` As noted by @ppedrot there are some small differences on semantics: > OCaml's `trim` also takes line feeds (LF) into account. Similarly, > OCaml's `split` never returns an empty list whereas Coq's `split` > does on the empty string. --- clib/cString.mli | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clib/cString.mli') diff --git a/clib/cString.mli b/clib/cString.mli index df25a3821a..a73c2729d0 100644 --- a/clib/cString.mli +++ b/clib/cString.mli @@ -31,7 +31,8 @@ sig (** [implode [s1; ...; sn]] returns [s1 ^ ... ^ sn] *) val strip : string -> string - (** Remove the surrounding blank characters from a string *) + (** Alias for [String.trim] *) + [@@ocaml.deprecated "Use [trim]"] val drop_simple_quotes : string -> string (** Remove the eventual first surrounding simple quotes of a string. *) @@ -52,7 +53,8 @@ sig (** Generate the ordinal number in English. *) val split : char -> string -> string list - (** [split c s] splits [s] into sequences separated by [c], excluded. *) + (** [split c s] alias of [String.split_on_char] *) + [@@ocaml.deprecated "Use [split_on_char]"] val is_sub : string -> string -> int -> bool (** [is_sub p s off] tests whether [s] contains [p] at offset [off]. *) -- cgit v1.2.3