libcfe  0.12.1
some useful C-functions
strcat2.c File Reference
#include "config.h"
#include "strcat2.h"
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include "len.h"
Include dependency graph for strcat2.c:

Go to the source code of this file.

Functions

char * strcat2 (const char *delim, unsigned int n,...)
 

Function Documentation

◆ strcat2()

char* strcat2 ( const char *  delim,
unsigned int  n,
  ... 
)

Combines multiple strings into one string. The inputed strings can be separated by a delimiter. The return value is a pointer to a malloc'd area containing the combined string ('\0' terminated).

Parameters
[in]delimPointer to the delimiter string ('\0' terminated), or NULL if no delimiter is wanted.
[in]nNumber of strings to process (number of following arguments)
[in]...Pointer to a string ('\0' terminated). NULL will omit this parameter and the preceding delimiter. An empty string (first character is \0) will print only the delimiter.
Returns
Pointer to a new malloc'd area containing the new string ('\0' terminated).

Definition at line 10 of file strcat2.c.