From 0761c13f316cc98ae7756f3527931aa86bed5016 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 29 Dec 2022 00:28:50 +0100 Subject: Restructuring of some headers into include/algo folder. Some API changes *_replace*() functions have been renamed, and a few minor API changes. --- include/stc/cregex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/stc/cregex.h') 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); -- cgit v1.2.3