Function

GLibstrjoin

Declaration

gchar*
g_strjoin (
  const gchar* separator,
  ...
)

Description

Joins a number of strings together to form one long string, with the optional separator inserted between each of them. The returned string should be freed with g_free().

Parameters

separator const gchar*
 

A string to insert between each of the strings, or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
...
 

A NULL-terminated list of strings to join.

Return value

Returns: gchar*
 

A newly-allocated string containing all of the strings joined together, with separator between them.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.