summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2022-05-31cleanup of icmp impl.Tyge Lovset
2022-05-31Generalized utf8_icmp_n() and added cstr_icmp(), csview_icmp().Tyge Lovset
2022-05-30Added utf8_icmp_n() case insensitive comparison.Tyge Lovset
2022-05-30Updated cstr utf8 docs.Tyge Løvset
2022-05-30added gitignoreTyge Løvset
2022-05-30Updated benchmarks and renamed utf8utils.c to utf8code.cTyge Løvset
2022-05-30Renamed utf8utils.c => utf8code.cTyge 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-30Large refactoring on strings / utf8 and some file structure.Tyge Lovset
2022-05-30Added more utf8 features. Changed linking macros in ccommon.h.Tyge Lovset
2022-05-29Internal: Changed using i_keyraw to using _cx_raw or _cx_rawkey typedefs: ↵Tyge Lovset
avoids problem when i_keyraw is pointer.
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-27Some changes in utf8.hTyge Løvset
2022-05-27Small optimizes in utf8.hTyge Løvset
2022-05-25Fixed #25: "behaviour of cstr_clear is suprising": Resets size to 0, while ↵Tyge Løvset
keeping current allocation.
2022-05-25Final reorg of cbits.h. This was really an experiment to make it dual ↵Tyge Løvset
fixed-sized and dynamic.
2022-05-24API change: cbits now uses container pointers args in all member functions, ↵Tyge Løvset
except clone() ... for now. All containers may get same treatment! which will be a rather big API change. This was needed after testing fixed size cbits performance with pass-by-value: was very slow for large bitsets: now faster than std::bitset<>. Also reverted previous cbits_set_value(): much faster because it is branchless.
2022-05-24Changed c_forpair(k, v, Map, map) so that k and v are pointers instead of ↵Tyge Løvset
values. This to make it consistent with c_foreach, c_apply, c_apply_arr.
2022-05-24Reverted back to some older codeTyge Løvset
2022-05-23Bugfix: cstr_find_s() returned bool. Fix return size_t.Tyge Løvset
2022-05-23Renamed cstr_find_n(self, search, pos, nmax) => cstr_find_from(self, pos, ↵Tyge Løvset
search), and cstr_replace_first(self, search, repl) => cstr_replace_first(self, pos, search, repl). // returns pos after replaced str.
2022-05-23Small simplify in cbits.hTyge Løvset
2022-05-23Finished cbits.h ; only inlined funcs are templated.Tyge Løvset
2022-05-23Small shape.c update.Tyge Løvset
2022-05-22Changed c_apply(v, ..) macro to make it more consistent with c_apply_arr(v, ↵Tyge Løvset
..) and c_foreach (i, ..): v changed to a pointer - not value. Note: also c_pair(v) is changed correspondingly, so usage with c_apply(v) is unchanged.
2022-05-22Rewrote cbits to make it dual: fixed-sized or dynamically sized by adding ↵Tyge Løvset
optional i_len template parameter. Renamed cbits_set_values() to cbits_set_pattern(). Added example bits2.c
2022-05-20Removed cstr_from_replace_all_sv(), Added cstr_replace_first(). Renamed ↵Tyge Løvset
argument names.
2022-05-20Added shape.cpp for comparison. Renamed some examples.Tyge Løvset
2022-05-20Final shape.c updateTyge Løvset
2022-05-20Yet a fix in shape.cTyge Løvset
2022-05-20Minor shape.c change.Tyge Løvset
2022-05-20Changed example shape.cTyge Løvset
2022-05-19Some extra test on template params. Update shape.c example.Tyge Løvset
2022-05-19Small update of shape.cTyge Løvset
2022-05-19Added _toval() in carc and cbox. Added dynamic polymorphism example, shape.c.Tyge Løvset
2022-05-18Formatted carc.h cbox.h: also simplified; removed _get() -> was same as ↵Tyge Løvset
_toraw(), see template.h diff.
2022-05-16Changed contructor names in carr2/carr3 to be more consistent with other ↵Tyge Løvset
containers.
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-05-13Added cstr_assign_s(), and changed return type to char* for cstr_assign*() ↵Tyge Løvset
and cstr_append*(), i.e. the pointer to the (possible new) string buffer.
2022-05-13Fixed bug in cstr_assign_n(). Thanks to murtazahakim for reporting.Tyge Løvset
2022-05-13constness and code formatting.Tyge Lovset
2022-05-12i_keyfrom/i_valfrom no longer used with i_key_bind/i_val_bind. Is considered ↵Tyge Løvset
optional for enabling emplace.
2022-05-12Fixed issues with i_keyfrom/i_valfromTyge Løvset
2022-05-12Reverted some back, and made c_less_cmp() safer.Tyge Løvset
2022-05-11Added robustness (hopefully).Tyge Løvset
2022-05-11Added i_less template param as alternative to i_cmp.Tyge Løvset
2022-05-11minor cleanup cmapTyge Løvset
2022-05-10Renamed (newish) functions expand_uninitialized to expand_uninit. + some ↵Tyge Lovset
minor changes.
2022-05-09Formatting only.Tyge Løvset
2022-05-09Small improvement in c_default_hash()Tyge Løvset