added sstrcat documentation

Mon, 21 Jul 2014 13:04:57 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 21 Jul 2014 13:04:57 +0200
changeset 183
6a694f8f0084
parent 182
998bf7c643b4
child 184
5c0990c95f74

added sstrcat documentation

ucx/string.h file | annotate | diff | comparison | revisions
--- a/ucx/string.h	Mon Jul 14 16:54:10 2014 +0200
+++ b/ucx/string.h	Mon Jul 21 13:04:57 2014 +0200
@@ -120,13 +120,34 @@
 size_t sstrnlen(size_t count, sstr_t string, ...);
 
 /**
- * Concatenates strings.
+ * Concatenates two or more strings.
+ * 
+ * The resulting string will be allocated by standard <code>malloc()</code>. 
+ * So developers <b>MUST</b> pass the sstr_t.ptr to <code>free()</code>.
+ * 
+ * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
+ * terminated.
  *
  * @param count   the total number of strings to concatenate
- * @param ...     all strings
+ * @param s1      first string
+ * @param s2      second string
+ * @param ...     all remaining strings
  * @return the concatenated string
  */
 sstr_t sstrcat(size_t count, sstr_t s1, sstr_t s2, ...);
+
+/**
+ * Concatenates two or more strings using an UcxAllocator.
+ * 
+ * See sstrcat() for details.
+ *
+ * @param a       the allocator to use
+ * @param count   the total number of strings to concatenate
+ * @param s1      first string
+ * @param s2      second string
+ * @param ...     all remaining strings
+ * @return the concatenated string
+ */
 sstr_t sstrcat_a(UcxAllocator *a, size_t count, sstr_t s1, sstr_t s2, ...);
 
 

mercurial