summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cregex.h
AgeCommit message (Collapse)Author
2023-08-17Renamed "internal" csview member .str => .buf, as it is not null terminated ↵Tyge Lovset
like crawstr .str member.
2023-08-14Reverted csubstr => csview. Sorry about that!Tyge Løvset
Added crawstr to become the null-terminated string view.
2023-08-13API CHANGES:tylov
Changed csview: becomes a null-terminated string view. Added csubview: a null-terminated string view/span, like previous csview. Note that csview works like a csubview, so not much compability issues should arise. However, some functions have changed from _sv suffix to _ss.
2023-07-10Renamed input enum flags for cregex functions.tylov
2023-06-11Added priv/linkage.h and renamed priv/template2.h => priv/template_undef.h.Tyge Løvset
Make all examples c++ compatible, except those using cspan.h Removed: crange_obj() Renamed: crange_make() => crange_init() Renamed: cspan_make() => cspan_init() Renamed: cstr_NULL => cstr_null Renamed: csview_NULL => csview_null
2023-06-09Rename i_extern template flag to i_import. i_extern still available, but ↵Tyge Løvset
deprecated.
2023-06-09Fixed issues with linking params i_implement, i_extern.Tyge Løvset
2023-05-23Some house holding cleanup.Tyge Løvset
2023-05-21NB! Made cstr.h header-only by default. Now requires #define i_static, ↵Tyge Lovset
i_implement or i_extern (includes utf8code.c) to implement non-inline functions (or link with libstc).
2023-05-20Bug fix (NB!): cregex_captures() now returns num of cap. group *excluding* ↵Tyge Lovset
the full match group (0).
2023-02-08Changed to use lowercase flow-control macros in examples (uppercase will ↵Tyge Løvset
still be supported). Improved many examples to use c_make() to init containers.
2023-02-05Fixed linking parameters i_extern.Tyge Løvset
2023-02-01Massive update from unsigned sizes and indices to signed.Tyge Lovset
2023-01-31Converted all containers but the maps and examples to signed sizes and indices.Tyge Løvset
2023-01-26Updated API for cregex.Tyge Løvset
2023-01-24Added python single-header generator + fixed include mistake.Tyge Løvset
2022-12-31Internally renamed ccommon.h macros to uppercase. Lowercase macros are still ↵Tyge Løvset
supported via include/stc/priv/lowcase.h.
2022-12-29Restructuring of some headers into include/algo folder. Some API changes ↵Tyge Løvset
*_replace*() functions have been renamed, and a few minor API changes.
2022-12-19Some cleanup in cregex.Tyge Løvset
2022-12-14cregex: renamed enums to all uppercase and prefixed CREG_Tyge Løvset
2022-12-08Changed/simplified cregex_replace*() API.Tyge Løvset
2022-12-04Support for linking dependant UTF8 and cstr functions and/or cregex.c by ↵Tyge Løvset
defining i_extern before including <stc/cstr.h> and <stc/cregex.h>. I.e. #define i_extern #define i_implement // define cstr functions as shared symbols (static if not defined). #include <stc/cregex.h> // include cstr.h, utf8code.c, cregex.c, unless already included.
2022-11-22Fixes of -Wconversion warnings (not examples).Tyge Løvset
2022-10-21Swapped two last params in cregex_replace_pattern() and cregex_replace_sv() ↵Tyge Løvset
to always have flags at last (sorry for inconveniences). Fixed a small bug in cregex_find_sv(), and added cre_default flag for readability.
2022-10-18Internal renamings only.Tyge Løvset
2022-10-14Update sso_bench.cpp benchmark, and some internal improvements.Tyge Løvset
2022-09-21Recent macro renames:Tyge Løvset
c_foreach_token() => c_fortoken() c_foreach_match() => c_formatch() Added: c_forfiltered() c_forpred()
2022-09-16Maintenance update.Tyge Løvset
2022-09-11Changed cregex API:Tyge Løvset
1) Renamed: cregex_find_pt() -> cregex_find_pattern() cregex_replace_pe() -> cregex_replace_pattern() cregex_replace_ex() -> cregex_replace_sv() 2) Removed: cregex_replace_pt() 3) Moved cregex* (or pattern) to be first parameter.
2022-09-06- Added c_foreach_token(it, ...) macro in csview.h.Tyge Løvset
- Changed c_foreach_match(it, ...): to access matches, use it.match[j] - splitstr.c now shows usages of both the above.
2022-08-11Minor formatting.Tyge Lovset
2022-08-09Small API change for V4.0:Tyge Løvset
Renamed cregex_find_p() => cregex_find_pt() // pattern Renamed cregex_replace_p() => cregex_replace_pt() // pattern
2022-08-02Removed mflags parameter in cregex_is_match(input, re).Tyge Løvset
2022-08-02Improved the cregex_iter type and c_foreach_match() macro.Tyge Løvset
2022-08-02Changed c_foreach_match (m, re, input) to take pointer: cregex* re.Tyge Løvset
2022-08-01fixed up last commitTyge Løvset
2022-08-01start dev on v4, mainly improving APITyge Løvset
2022-07-30Added support for more than 9 capture group replacements, e.g. "$12;". Added ↵Tyge Løvset
an inline function cregex_find_sv().
2022-07-28VERSION 3.8 RC. Added cregex with "final" API + docs. README.md updated with ↵Tyge Løvset
links to cregex, coption. crandom.h: fixed "stc64_with_seq doesn't use seq argument #31" thanks to funny-falcon. Removed deprecated funcs. Added tags for v3.6 and v3.7.
2022-07-23Fixed a few small issues with cregex.c Reverted cregex_match() to ↵Tyge Løvset
cregex_find(). Renamed cre_* flags.
2022-07-22Switched from "\\" as replacement group prefix to '$'. cregex_replace() ↵Tyge Løvset
changed: removed the last two args.
2022-07-22FINAL cregex update for now: optimize/change callback mfun API. Also, ↵Tyge Løvset
cstr_printf() cannot take self as print argument.
2022-07-22Last minor API changes for cregex. Added descriptions in header. Updated RE ↵Tyge Løvset
examples.
2022-07-22Changed / improved cregex API again (as promised). Possible final API.Tyge Lovset
2022-07-21cregex API change: Added cregex_match_ex() and cregex_match() with string ↵Tyge Løvset
pattern input instead of a cregex*, similar to cregex_replace*().
2022-07-21Extended regex_replace.c examples.Tyge Lovset
2022-07-20Cleanups, and renamed cregex_replace_fn() => cregex_replace_ex().Tyge Lovset
2022-07-20Added cregex_replace*() [implemented in utf8code.c]. Added ↵Tyge Lovset
examples/regex_replace.c. Docs not ready, i.e. API not fixed. Some other refactoring and minor fixes/improvements. cstr_assign_sv() now returns char* like the other cstr_assign*().
2022-06-12Renamed cregex_find89 => cregex_match()Tyge Løvset
2022-06-01Converted all files with DOS line endings to LINUX.Tyge Løvset