cher-nov / Gena

Generic pseudo-templated containers for C. Written entirely in C89 with design inspired by the C++ STL. /// DOCS ARE SLIGHTLY OUTDATED, PROJECT IS STABLE AND STILL BEING DEVELOPED
https://habr.com/ru/post/324210/
Do What The F*ck You Want To Public License
89 stars 6 forks source link

An implementation of dynamic strings based on genvector #3

Open cher-nov opened 7 years ago

cher-nov commented 7 years ago

Ideas:

  1. Should be null-terminated (i.e. count is always at least 1, and length is count-1).
  2. Should have functions similar to standard ones from string.h, but with taking length into account.
  3. Full name is "dynstring" and shortened is "dstr".
  4. typedef gvec_dstr_t dstr_t
  5. Consider using another repository for this.
  6. Use GVEC_MODULAR_APPROACH.
  7. Preserve compatibility with C89.
  8. Alias gvec functions with dstr_* prefix using defines (nb: this will not break function pointer obtainment).

tl;dr: steal everything from sds