summaryrefslogtreecommitdiffhomepage
path: root/include/stc
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc')
-rw-r--r--include/stc/cregex.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index fff8ccb1..1b77a980 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -97,8 +97,11 @@ int cregex_match_p(const char* input, const char* pattern,
csview match[], int cmflags);
/* replace regular expression */
-cstr cregex_replace(const char* input, const cregex* re, const char* replace,
- bool (*mfun)(int i, csview match, cstr* mstr), unsigned count);
+cstr cregex_replace_re(const char* input, const cregex* re, const char* replace,
+ bool (*mfun)(int i, csview match, cstr* mstr), unsigned count);
+static inline
+cstr cregex_replace(const char* input, const cregex* re, const char* replace)
+ { return cregex_replace_re(input, re, replace, NULL, 0); }
/* replace + compile RE pattern, and extra arguments */
cstr cregex_replace_pe(const char* input, const char* pattern, const char* replace,