@mariusor one tip for strings is to use snprintf with a null output string, which will compute the size needed and return that (for allocating, then calling snprintf again)
@drewdevault that's actually kind of cool, it would never have occurred to me. I was just thinking to allocate a random half meg block for every string. :D
Add comment