From 28ee78e128c14fe309cb5f7cfc3f2172bf675ea7 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 22 Jul 2022 13:52:38 +0200 Subject: Last minor API changes for cregex. Added descriptions in header. Updated RE examples. --- src/cregex.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cregex.c b/src/cregex.c index 54b13431..8705b335 100644 --- a/src/cregex.c +++ b/src/cregex.c @@ -1221,8 +1221,8 @@ cregex_match(const char* input, const cregex* re, } } -int cregex_match_pat(const char* input, const char* pattern, - csview match[], int cmflags) { +int cregex_match_p(const char* input, const char* pattern, + csview match[], int cmflags) { cregex re = cregex_init(); int res = cregex_compile(&re, pattern, cmflags); if (res < 0) return res; @@ -1254,9 +1254,8 @@ cregex_replace(const char* input, const cregex* re, const char* replace, } cstr -cregex_replace_patx(const char* input, const char* pattern, - const char* replace, cstr (*mfun)(int i, csview match), - unsigned count, int cflags) { +cregex_replace_pe(const char* input, const char* pattern, const char* replace, + cstr (*mfun)(int i, csview match), unsigned count, int cflags) { cregex re = cregex_init(); int res = cregex_compile(&re, pattern, cflags); if (res < 0) -- cgit v1.2.3