From ca01dd726e2ed8f8b69f8ff08855e80f4eea7247 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 26 Sep 2022 08:08:47 +0200 Subject: DEPRECATED: c_forrange(): replaced with c_forloop(). This uses 'long long' as iter type, i.e. "%lld" printf format. crange_from() renamed to crange_make(). More docs. --- docs/cregex_api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/cregex_api.md') diff --git a/docs/cregex_api.md b/docs/cregex_api.md index 2a0b22a8..66b97834 100644 --- a/docs/cregex_api.md +++ b/docs/cregex_api.md @@ -128,14 +128,14 @@ To iterate multiple matches in an input string, you may use ```c csview match[5] = {0}; while (cregex_find(&re, input, match, cre_m_next) == cre_success) - c_forrange (k, int, cregex_captures(&re)) - printf("submatch %d: %.*s\n", k, c_ARGsv(match[k])); + c_forloop (k, cregex_captures(&re)) + printf("submatch %lld: %.*s\n", k, c_ARGsv(match[k])); ``` There is also a safe macro which simplifies this: ```c c_formatch (it, &re, input) - c_forrange (k, int, cregex_captures(&re)) - printf("submatch %d: %.*s\n", k, c_ARGsv(it.match[k])); + c_forloop (k, cregex_captures(&re)) + printf("submatch %lld: %.*s\n", k, c_ARGsv(it.match[k])); ``` ## Using cregex in a project -- cgit v1.2.3