From 655f2bc59e11ccd16229f2e7474b013e585192fb Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Thu, 30 Jul 2015 17:26:16 -0400 Subject: Implement regex substitution --- src/regex__FFI.urs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/regex__FFI.urs') diff --git a/src/regex__FFI.urs b/src/regex__FFI.urs index 862d4f3..f01a27e 100644 --- a/src/regex__FFI.urs +++ b/src/regex__FFI.urs @@ -28,3 +28,10 @@ val subexpression_match : match -> int -> string val do_match : string (* needle *) -> string (* haystack *) -> match + +(* Replaces all substrings in 'haystack' that match 'needle' with the string +'replacement.' *) +val replace : string (* needle *) + -> string (* haystack *) + -> string (* replacement *) + -> string -- cgit v1.2.3