aboutsummaryrefslogtreecommitdiff
path: root/clib/cString.mli
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-10-16 01:28:36 +0200
committerEmilio Jesus Gallego Arias2018-10-16 13:25:03 +0200
commit33c93006b7685092b5239ea001058578fac3552f (patch)
tree49b94d72ee9d52a1355d478b6081d3f9bc404b40 /clib/cString.mli
parent697a59de8a39f3a4b253ced93ece1209b7f0eb1b (diff)
[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.
Diffstat (limited to 'clib/cString.mli')
-rw-r--r--clib/cString.mli6
1 files changed, 4 insertions, 2 deletions
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]. *)