Re:Show HN: Stricks – managed C strings library
by gkfasdfasdf on Thursday March 25, 2021 @07:34PM
(#26587011)
stx_new allocates the string, per the readme.
My point is that the readme example is misleading, as the two code samples are not equivalent.
That said, I don't really see why one would need such a no-realloc function. In c++, I would just use std::string::reserve(some_big_num).