diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-03-08 19:52:03 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-03-08 19:52:03 +0000 |
commit | 6c24f4f90b23e8c4536281d31461adfe5a15b739 (patch) | |
tree | 29f6c4af8052800cc7d0eafb9650c6be8e90a2e5 /stdlib/stringLabels.mli | |
parent | 1fb4007ece64b1d59e16d7a84639fce1dd69ed45 (diff) |
merge version 3.12 from 3.12.1 to r12205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/stringLabels.mli')
-rw-r--r-- | stdlib/stringLabels.mli | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/stdlib/stringLabels.mli b/stdlib/stringLabels.mli index 5a17c67da..84f618be2 100644 --- a/stdlib/stringLabels.mli +++ b/stdlib/stringLabels.mli @@ -86,11 +86,22 @@ val iter : f:(char -> unit) -> string -> unit val iteri : f:(int -> char -> unit) -> string -> unit (** Same as {!String.iter}, but the - function is applied to the index of the element as first argument (counting from 0), - and the character itself as second argument. + function is applied to the index of the element as first argument + (counting from 0), and the character itself as second argument. @since 3.13.0 *) +val map : f:(char -> char) -> string -> string +(** [String.map f s] applies function [f] in turn to all + the characters of [s] and stores the results in a new string that + is returned. *) + +val trim : string -> string +(** Return a copy of the argument, without leading and trailing whitespace. + The characters regarded as whitespace are: [' '], ['\012'], ['\n'], + ['\r'], and ['\t']. If there is no whitespace character in the argument, + return the original string itself, not a copy. *) + val escaped : string -> string (** Return a copy of the argument, with special characters represented by escape sequences, following the lexical |