summaryrefslogtreecommitdiffhomepage
path: root/docs/cregex_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-09 08:56:41 +0200
committerTyge Løvset <[email protected]>2022-08-09 08:56:41 +0200
commitfb7ca13856348182b4071135cce82075f9b95e6d (patch)
treec4ed4c905c68faacae22703e121c27f5cc7673bd /docs/cregex_api.md
parent2df3fb58bb21be5afcfa78fd0b5d1aee033ebe9e (diff)
downloadSTC-modified-fb7ca13856348182b4071135cce82075f9b95e6d.tar.gz
STC-modified-fb7ca13856348182b4071135cce82075f9b95e6d.zip
Small API change for V4.0:
Renamed cregex_find_p() => cregex_find_pt() // pattern Renamed cregex_replace_p() => cregex_replace_pt() // pattern
Diffstat (limited to 'docs/cregex_api.md')
-rw-r--r--docs/cregex_api.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/cregex_api.md b/docs/cregex_api.md
index 34278905..43ad1f41 100644
--- a/docs/cregex_api.md
+++ b/docs/cregex_api.md
@@ -35,7 +35,7 @@ int cregex_captures(const cregex* self);
int cregex_find(const char* input, const cregex* re, csview match[], int mflags);
int cregex_find_sv(csview input, const cregex* re, csview match[]);
// takes string pattern instead of re. (for one-time matches)
-int cregex_find_p(const char* input, const char* pattern, csview match[], int cmflags);
+int cregex_find_pt(const char* input, const char* pattern, csview match[], int cmflags);
bool cregex_is_match(const char* input, const cregex* re);
@@ -43,7 +43,7 @@ cstr cregex_replace(const char* input, const cregex* re, const char* repl
cstr cregex_replace_ex(const char* input, const cregex* re, const char* replace, unsigned count,
int rflags, bool (*mfun)(int grp, csview match, cstr* mstr));
// takes string pattern instead of re
-cstr cregex_replace_p(const char* input, const char* pattern, const char* replace, unsigned count);
+cstr cregex_replace_pt(const char* input, const char* pattern, const char* replace, unsigned count);
cstr cregex_replace_pe(const char* input, const char* pattern, const char* replace, unsigned count,
int crflags, bool (*mfun)(int grp, csview match, cstr* mstr));
@@ -118,7 +118,7 @@ int main() {
For a single match you may use the all-in-one function:
```c
-if (cregex_find_p(input, pattern, match, 0))
+if (cregex_find_pt(input, pattern, match, 0))
printf("Found date: %.*s\n", c_ARGsv(match[0]));
```