]> diplodocus.org Git - nmh/commitdiff
Add comment describing concat().
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 17:44:58 +0000 (18:44 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 17:44:58 +0000 (18:44 +0100)
sbr/concat.c

index f5cf1ae..234d175 100644 (file)
 #include <h/utils.h>
 
 
+/* 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, ...)
 {