summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1999-03-04 09:48:32 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1999-03-04 09:48:32 +0000
commitbfeac0e08d86a0f032cb8b857905924e227d2874 (patch)
treee4fd1b65230f2d6345416d094fff2eb74115ae2a
parent097bf8fc477d0b6d5c4d22e210a63f3886f1d3dc (diff)
Doc de replace_matched
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2327 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/str/str.mli10
1 files changed, 7 insertions, 3 deletions
diff --git a/otherlibs/str/str.mli b/otherlibs/str/str.mli
index 97882fb8f..f7f47a323 100644
--- a/otherlibs/str/str.mli
+++ b/otherlibs/str/str.mli
@@ -90,9 +90,7 @@ val matched_group: int -> string -> string
by the [n]th group [\(...\)] of the regular expression during
the latest [string_match], [search_forward] or [search_backward].
The user must make sure that the parameter [s] is the same string
-that was passed to the matching or searching function. *)
-
-val replace_matched : string -> string -> string
+ that was passed to the matching or searching function. *)
val group_beginning: int -> int
val group_end: int -> int
(* [group_beginning n] returns the position of the first character
@@ -122,6 +120,12 @@ val global_substitute: regexp -> (string -> string) -> string -> string
val substitute_first: regexp -> (string -> string) -> string -> string
(* Same as [global_substitute], except that only the first substring
matching the regular expression is replaced. *)
+val replace_matched : string -> string -> string
+ (* [replace_matched repl s] returns the replacement text [repl]
+ in which [\1], [\2], etc. have been replaced by the text
+ matched by the corresponding groups in the most recent matching
+ operation. [s] must be the same string that was matched during
+ this matching operation. *)
(*** Splitting *)