# HG changeset patch # User Olaf Wintermann # Date 1405940697 -7200 # Node ID 6a694f8f0084bf5a7a56246af1bc75f036e0f8d9 # Parent 998bf7c643b4c16be52d5e1422949f3abb9a9f8b added sstrcat documentation diff -r 998bf7c643b4 -r 6a694f8f0084 ucx/string.h --- 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 malloc(). + * So developers MUST pass the sstr_t.ptr to free(). + * + * The sstr_t.ptr of the return value will always be NULL- + * 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, ...);