Costa Tsaousis 24282e490a fix compilation warnings (#16001) 1 year ago
..
Makefile.am cb7af25c09 RRD structures managed by dictionaries (#13646) 2 years ago
README.md f9acc1aead More learn reorg/reordering (#14505) 2 years ago
string.c 24282e490a fix compilation warnings (#16001) 1 year ago
string.h 0e230a260e Revert "Refactor RRD code. (#15423)" (#15723) 1 year ago
utf8.h cd50bf4236 /api/v2 part 4 (#14706) 2 years ago

README.md

STRING

STRING provides a way to allocate and free text strings, while de-duplicating them.

It can be used similarly to libc string functions:

  • strdup() and strdupz() become string_strdupz().
  • strlen() becomes string_strlen() (and it does not walkthrough the bytes of the string).
  • free() and freez() become string_freez().

There is also a special string_dup() function that increases the reference counter of a STRING, avoiding the index lookup to find it.

Once there is a STRING *, the actual const char * can be accessed with string2str().

All STRING should be constant. Changing the contents of a const char * that has been acquired by string2str() should never happen.