summaryrefslogtreecommitdiffhomepage
path: root/examples/replace.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-12-20Renamed c_sv() => c_SV() and reverted cstr_new() => cstr_lit(). Old names ↵Tyge Løvset
are deprecated (not removed).
2022-08-13Experimental: Renamed c_autovar => c_with, c_autoscope => c_scope, ↵Tyge Løvset
c_autodefer => c_defer. May or may not be reverted before V4.0 release.
2022-07-27VERSION 3.8 BETA: Some changes in cstr / csview APIs: replace* / find*, ↵Tyge Løvset
*_u8(). . See README.md
2022-06-21Renamed cstr_rename_n() => cstr_rename_with_n() as it could be confused to ↵Tyge Løvset
replace n instances instead of n bytes.
2022-06-01Renamed cstr_replace() => cstr_replace_at(), and cstr_replace_one() => ↵Tyge Løvset
cstr_replace(self, start, search, replace).
2022-06-01Reverted to default static linkage of non-templated symbols (cstr, csview, ↵Tyge Løvset
..), as it gives smaller executables and is convenient for small applications. (no need to define i_implement when functions is used in one translaton unit only).
2022-06-01Converted all files with DOS line endings to LINUX.Tyge Løvset
2022-05-30Done refactoring:Tyge Løvset
- Non-templated types (cstr, csview, cbits, crandom) have no longer default static linking. Now i_header is defined, i.e. files are as headers only. ==> Define `i_implement` before file inclusion. Still possible to do static linkage by defining `i_static` before inclusion or global STC_STATIC. - Templated containers still have static linkage by default. - Renamed csview_substr(), csview_slice() to csview_substr_ex(), csview_slice_ex(). Added simpler inlined csview_substr(), csview_slice().
2022-05-29Renamed cstr_replace_first() => cstr_replace_one().Tyge Lovset
cstr.h now #include "utf8.h". Added iterator (utf8) to cstr and other utf8 functions postfixed by _u8(). Also renamed some utf8 functions in csview to better names.
2022-04-18Converted all example to use cstr_str(&s) instead of s.str to allow SSO ↵Tyge Løvset
string. Fixed misc warnings.
2022-02-16Refactoring. Added size type param to forward_cmap/csmap . Reverted ↵Tyge Løvset
c_autovar macros. Added utf8_encode (not used yet).
2022-01-03"gcc/clang -O2 -Wall -std=c99 -pedantic" compiles examples with no warnings. ↵Tyge Løvset
More cleanups.
2021-12-19First commit for Version 3 of STC. Main changes are consistent rename of ↵Tyge Løvset
'_del' to '_drop' and '_compare' to '_cmp'. Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
2021-10-05Changed recommended order of defining template parameters.Tyge Løvset
2021-09-20Renamed macros: breaking changes for Version 2.0!Tyge Lovset
c_forvar => c_autovar c_forscope => c_autoscope c_forauto => c_auto Removed: c_fordefer(x); use c_forscope(0, x) instead. Added: c_exitauto; // continue
2021-05-24Split c_fordefer() into c_forvar() and c_fordefer() macros.Tyge Løvset
2021-05-24Renamed c_with => c_fordefer, and removed c_withvar. Macros were too ↵Tyge Løvset
deceiving and hid the fact that it was for-loops. Now it is more explicit.
2021-05-18Added the new c_defer(), c_with(), c_withvar() macros into the examples.Tyge Løvset
2021-02-24More docs and some file renames.Tyge Løvset
2020-10-14Renamed cstr() constructor to cstr_from(), cstr_from() to cstr_from_fmt().Tyge Løvset
2020-09-20Cleanup and renamed c_del_() to c_del() again.Tyge Løvset
2020-09-18Changed <container>_ini macro constant to <container>_INIT, and ↵Tyge Løvset
<container>_destroy() to <container>_del.
2020-09-16Added some missing templates in cmap.Tyge Løvset
2020-09-15New API Change.Tyge Løvset
2020-09-02Updated pqueue_top() API. Added c_destroy() also working for cstr, cbitmap.Tyge Løvset
2020-08-30Renamed cstr_destr to cstr_mdestroy(). Added a few more examples.Tyge Løvset