An stb-style(single-file, header-only) dynamic string library in c.
Warning
This library was created for my own learning purpose. This library is WIP and untested in production. If you choose to use it, do it at your own risk.
- Copy dstr.h into your project.
- Include the library like this:
#define DSTR_IMPLEMENTATION
#include "dstr.h"- Note: define
DSTR_IMPLEMENTATIONonly once in your project. For more information, see stb_howto.txt - This library uses
reallocandfreeofstdlibto allocate and free memory. If you want to use your own custom allocator and free, you can do that by definingDSTR_ALLOCandDSTR_FREE. Note that you must define both or neither.