summaryrefslogtreecommitdiffhomepage
path: root/examples/utf8replace_c.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-12-20Renamed (reverted) cstr_new(lit) => cstr_lit(lit). Old name is deprecated ↵Tyge Løvset
(supported for now).
2022-12-20Renamed c_sv() => c_SV() and reverted cstr_new() => cstr_lit(). Old names ↵Tyge Løvset
are deprecated (not removed).
2022-12-19Renames:Tyge Løvset
cstr_null => cstr_NULL csview_null => csview_NULL cstr_npos => c_NPOS csview_npos => c_NPOS c_ARGsv(sv) => c_ARGSV(sv) c_init(x) => c_INIT(x)
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-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-15More iterator fixes. Make sure cvec/cdeq find_in() return end() iterator if ↵Tyge Løvset
item not found. Small cstr API change to u8_replace*.
2022-08-09Experiment with other type of iterator. Does not compile.Tyge Løvset
2022-07-31csview: csview_token(sv, sep, &start): now start > sv.size on last token. ↵Tyge Løvset
Removed usage of c_ARGsv() macro in examples => printf formatting ".*s". csview fully inlined.
2022-07-27VERSION 3.8 BETA: Some changes in cstr / csview APIs: replace* / find*, ↵Tyge Løvset
*_u8(). . See README.md
2022-06-10removed cstr_length() and csview_length() -> use .._size().Tyge Løvset
2022-06-10utf8 fixes and improvements. Some api changes.Tyge Løvset
2022-06-01Change: Split replace into two: cstr_replace(s, search, repl), ↵Tyge Løvset
cstr_replace_from(s, pos, search, repl): matches cstr_find() + cstr_find_from().
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-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-05-13Changed csview c_PRIsv macro. Now must be prefixed with "%", to match with ↵Tyge Løvset
PRIxYYY macros from inttypes.h. E.g. printf("%40" c_PRIsv "\n", c_ARGsv(sv)); to specify 40 character right aligned output of sv. Check your usage.
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-03-26Fixed alt/cstr.h (short string optimized), so that it can be used in ↵Tyge Løvset
containers. Had to change some API in csview to make it play with that.
2022-03-16Bugfix: carc and cbox cmp functions had bug.Tyge Løvset
Renamed: i_key_sptr / i_val_sptr to i_key_arcbox / i_val_arcbox. Other smaller updates.