diff options
| author | Tyge Løvset <[email protected]> | 2022-12-11 10:52:32 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-12-11 10:52:32 +0100 |
| commit | 0db528ed0062920e9bd5b2c7fcdc7506bd41abad (patch) | |
| tree | 217b0c6b36964b84bac423bfc6a6c3333c0cd83d /docs | |
| parent | f500cd5301433015e7860ea4446e81db29c9369e (diff) | |
| parent | 3b616b5260f2f477563508b6eec5370506565da9 (diff) | |
| download | STC-modified-0db528ed0062920e9bd5b2c7fcdc7506bd41abad.tar.gz STC-modified-0db528ed0062920e9bd5b2c7fcdc7506bd41abad.zip | |
Merge branch 'master' of github.com:tylov/STC
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cregex_api.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/cregex_api.md b/docs/cregex_api.md index f1fd7461..865e569e 100644 --- a/docs/cregex_api.md +++ b/docs/cregex_api.md @@ -38,11 +38,13 @@ int cregex_find_pattern(const char* pattern, const char* input, csview m bool cregex_is_match(const cregex* re, const char* input); -cstr cregex_replace(const cregex* re, const char* input, const char* replace, unsigned count); +cstr cregex_replace(const cregex* re, const char* input, const char* replace); cstr cregex_replace_sv(const cregex* re, csview input, const char* replace, unsigned count, bool(*mfun)(int capgrp, csview match, cstr* mstr), int rflags); -cstr cregex_replace_pattern(const char* pattern, const char* input, const char* replace, unsigned count, - bool(*mfun)(int capgrp, csview match, cstr* mstr), int rflags); + +cstr cregex_replace_pattern(const char* pattern, const char* input, const char* replace); +cstr cregex_replace_pattern_n(const char* pattern, const char* input, const char* replace, unsigned count, + bool(*mfun)(int capgrp, csview match, cstr* mstr), int rflags); void cregex_drop(cregex* self); // destroy ``` @@ -104,7 +106,7 @@ int main() { printf("Could not find any date\n"); // Lets change all dates into US date format MM/DD/YYYY: - cstr us_input = cregex_replace(&re, input, "$2/$3/$1", 0); + cstr us_input = cregex_replace(&re, input, "$2/$3/$1"); printf("US input: %s\n", cstr_str(&us_input)); // Free allocated data |
