| > Is there a good string-manipulation C library? You will have to define "good". My string library[1][2] is "good" for me because: 1. It's compatible with all the usual string functions (doesn't define a new type `string_t` or similar, uses existing `char *`). 2. It does what I want: a) Works on multiple strings so repeated operations are easy, and b) Allocates as necessary so that the caller only has to free, and not calculate how much memory is needed beforehand. The combination of the above means that many common string operations that I want to do in my programs are both easy to do and easy to visually inspect for correctness in the caller. Others will say that this is not good, because it still uses and exposes `char *`. [1] https://github.com/lelanthran/libds/blob/master/src/ds_str.h [2] Currently the only bug I know of is the quadratic runtime in many of the functions. I intend to fix this at some point. |