summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2014-08-16 17:48:45 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2014-08-16 17:48:45 +0000
commit6d3318df9f1f0c4ee4dd7ca6aeaeca04bd5067a6 (patch)
tree4ba42d8bfa2cc539f3326ab1dee2815a9b754c0c
parent1a87dee8e3d7c895d2752ab65f836b9149160ddc (diff)
downloadocaml-6d3318df9f1f0c4ee4dd7ca6aeaeca04bd5067a6.tar.gz
I forgot about {Bytes,String}Labels.mapi; thanks Alain!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--stdlib/bytesLabels.mli5
-rw-r--r--stdlib/stringLabels.mli6
2 files changed, 11 insertions, 0 deletions
diff --git a/stdlib/bytesLabels.mli b/stdlib/bytesLabels.mli
index 23ccaf3911..b92e76d093 100644
--- a/stdlib/bytesLabels.mli
+++ b/stdlib/bytesLabels.mli
@@ -112,6 +112,11 @@ val map : f:(char -> char) -> bytes -> bytes
stores the resulting bytes in a new sequence that is returned as
the result. *)
+val mapi : (int -> char -> char) -> bytes -> bytes
+(** [mapi f s] calls [f] with each character of [s] and its
+ index (in increasing index order) and stores the resulting bytes
+ in a new sequence that is returned as the result. *)
+
val trim : bytes -> bytes
(** Return a copy of the argument, without leading and trailing
whitespace. The bytes regarded as whitespace are the ASCII
diff --git a/stdlib/stringLabels.mli b/stdlib/stringLabels.mli
index dcef6db036..1cf5d51ede 100644
--- a/stdlib/stringLabels.mli
+++ b/stdlib/stringLabels.mli
@@ -104,6 +104,12 @@ val map : f:(char -> char) -> string -> string
is returned.
@since 4.00.0 *)
+val mapi : f:(int -> char -> char) -> string -> string
+(** [String.mapi f s] calls [f] with each character of [s] and its
+ index (in increasing index order) and stores the results in a new
+ string that is returned.
+ @since 4.02.0 *)
+
val trim : string -> string
(** Return a copy of the argument, without leading and trailing
whitespace. The characters regarded as whitespace are: [' '],