[ccan] New module: stringbuilder

stuartl at longlandclan.yi.org stuartl at longlandclan.yi.org
Sun Aug 17 21:09:46 EST 2014


Hi all,

Any time I've been writing some program I've often found myself needing to join
strings together repeatedly, something strncat does, but not well.  The most
common example is joining the name of a file onto a directory.

The following patch is a cleaned up version of the functions I've been using.
I included tests for all three functions, although the ccanlint tool doesn't
seem to recognise one of the tests.

I figured I'd post this here in case others found it useful.


Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.


More information about the ccan mailing list