summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cregex.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-29 00:28:50 +0100
committerTyge Løvset <[email protected]>2022-12-29 00:28:50 +0100
commit0761c13f316cc98ae7756f3527931aa86bed5016 (patch)
treee90777558956fcf91d6b1c958e0c3a6fb0ab007f /include/stc/cregex.h
parentd623c6c85071b9af5d607bb5d9aceceaea05220a (diff)
downloadSTC-modified-0761c13f316cc98ae7756f3527931aa86bed5016.tar.gz
STC-modified-0761c13f316cc98ae7756f3527931aa86bed5016.zip
Restructuring of some headers into include/algo folder. Some API changes *_replace*() functions have been renamed, and a few minor API changes.
Diffstat (limited to 'include/stc/cregex.h')
-rw-r--r--include/stc/cregex.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/stc/cregex.h b/include/stc/cregex.h
index b6e33879..975bd675 100644
--- a/include/stc/cregex.h
+++ b/include/stc/cregex.h
@@ -127,15 +127,15 @@ cstr cregex_replace_sv(const cregex* re, csview input, const char* replace, unsi
static inline
cstr cregex_replace(const cregex* re, const char* input, const char* replace) {
csview sv = {input, strlen(input)};
- return cregex_replace_sv(re, sv, replace, 0, NULL, CREG_DEFAULT);
+ return cregex_replace_sv(re, sv, replace, ~0U, NULL, CREG_DEFAULT);
}
/* replace + compile RE pattern, and extra arguments */
-cstr cregex_replace_pattern_n(const char* pattern, const char* input, const char* replace, unsigned count,
- bool (*mfun)(int i, csview match, cstr* mstr), int crflags);
+cstr cregex_replace_pattern_ex(const char* pattern, const char* input, const char* replace, unsigned count,
+ bool (*mfun)(int i, csview match, cstr* mstr), int crflags);
static inline
cstr cregex_replace_pattern(const char* pattern, const char* input, const char* replace)
- { return cregex_replace_pattern_n(pattern, input, replace, 0, NULL, CREG_DEFAULT); }
+ { return cregex_replace_pattern_ex(pattern, input, replace, ~0U, NULL, CREG_DEFAULT); }
/* destroy regex */
void cregex_drop(cregex* self);