311 * So developers \em must pass the return value to cx_strfree_a() eventually. |
311 * So developers \em must pass the return value to cx_strfree_a() eventually. |
312 * |
312 * |
313 * If \p str already contains a string, the memory will be reallocated and |
313 * If \p str already contains a string, the memory will be reallocated and |
314 * the other strings are appended. Otherwise, new memory is allocated. |
314 * the other strings are appended. Otherwise, new memory is allocated. |
315 * |
315 * |
316 * \note It is guaranteed that there is only one allocation. |
316 * If memory allocation fails, the pointer in the returned string will |
|
317 * be \c NULL. Depending on the allocator, \c errno might be set. |
|
318 * |
|
319 * \note It is guaranteed that there is only one allocation for the |
|
320 * resulting string. |
317 * It is also guaranteed that the returned string is zero-terminated. |
321 * It is also guaranteed that the returned string is zero-terminated. |
318 * |
322 * |
319 * @param alloc the allocator to use |
323 * @param alloc the allocator to use |
320 * @param str the string the other strings shall be concatenated to |
324 * @param str the string the other strings shall be concatenated to |
321 * @param count the number of the other following strings to concatenate |
325 * @param count the number of the other following strings to concatenate |
335 * Concatenates strings and returns a new string. |
339 * Concatenates strings and returns a new string. |
336 * |
340 * |
337 * The resulting string will be allocated by the specified allocator. |
341 * The resulting string will be allocated by the specified allocator. |
338 * So developers \em must pass the return value to cx_strfree_a() eventually. |
342 * So developers \em must pass the return value to cx_strfree_a() eventually. |
339 * |
343 * |
340 * \note It is guaranteed that there is only one allocation. |
344 * If memory allocation fails, the pointer in the returned string will |
|
345 * be \c NULL. Depending on the allocator, \c errno might be set. |
|
346 * |
|
347 * \note It is guaranteed that there is only one allocation for the |
|
348 * resulting string. |
341 * It is also guaranteed that the returned string is zero-terminated. |
349 * It is also guaranteed that the returned string is zero-terminated. |
342 * |
350 * |
343 * @param alloc the allocator to use |
351 * @param alloc the allocator to use |
344 * @param count the number of the other following strings to concatenate |
352 * @param count the number of the other following strings to concatenate |
345 * @param ... all other strings |
353 * @param ... all other strings |
352 * Concatenates strings and returns a new string. |
360 * Concatenates strings and returns a new string. |
353 * |
361 * |
354 * The resulting string will be allocated by standard \c malloc(). |
362 * The resulting string will be allocated by standard \c malloc(). |
355 * So developers \em must pass the return value to cx_strfree() eventually. |
363 * So developers \em must pass the return value to cx_strfree() eventually. |
356 * |
364 * |
357 * \note It is guaranteed that there is only one allocation. |
365 * If memory allocation fails, the pointer in the returned string will |
|
366 * be \c NULL and \c errno might be set. |
|
367 * |
|
368 * \note It is guaranteed that there is only one allocation for the |
|
369 * resulting string. |
358 * It is also guaranteed that the returned string is zero-terminated. |
370 * It is also guaranteed that the returned string is zero-terminated. |
359 * |
371 * |
360 * @param count the number of the other following strings to concatenate |
372 * @param count the number of the other following strings to concatenate |
361 * @param ... all other strings |
373 * @param ... all other strings |
362 * @return the concatenated string |
374 * @return the concatenated string |
371 * So developers \em must pass the return value to cx_strfree() eventually. |
383 * So developers \em must pass the return value to cx_strfree() eventually. |
372 * |
384 * |
373 * If \p str already contains a string, the memory will be reallocated and |
385 * If \p str already contains a string, the memory will be reallocated and |
374 * the other strings are appended. Otherwise, new memory is allocated. |
386 * the other strings are appended. Otherwise, new memory is allocated. |
375 * |
387 * |
376 * \note It is guaranteed that there is only one allocation. |
388 * If memory allocation fails, the pointer in the returned string will |
|
389 * be \c NULL and \c errno might be set. |
|
390 * |
|
391 * \note It is guaranteed that there is only one allocation for the |
|
392 * resulting string. |
377 * It is also guaranteed that the returned string is zero-terminated. |
393 * It is also guaranteed that the returned string is zero-terminated. |
378 * |
394 * |
379 * @param str the string the other strings shall be concatenated to |
395 * @param str the string the other strings shall be concatenated to |
380 * @param count the number of the other following strings to concatenate |
396 * @param count the number of the other following strings to concatenate |
381 * @param ... all other strings |
397 * @param ... all other strings |