From: Ralph Corderoy Date: Wed, 19 Oct 2016 17:44:58 +0000 (+0100) Subject: Add comment describing concat(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/ad098559d2ee9ed3c176be7d33e6583a573ffc96?ds=inline Add comment describing concat(). --- diff --git a/sbr/concat.c b/sbr/concat.c index f5cf1aea..234d1751 100644 --- a/sbr/concat.c +++ b/sbr/concat.c @@ -12,6 +12,11 @@ #include +/* concat returns a non-NULL malloc'd pointer to the catenation of the + * argument strings less their NUL terminators other than the last. The + * arguments are terminated by a NULL. + * + * Example: concat("abc", "def", "", "g", NULL) returns "abcdefg". */ char * concat (const char *s1, ...) {