/* Returns: a newly-allocated string containing all the string arguments  */
gchar* g_strconcat(const gchar *string1,...)
/* Returns: a newly-allocated string containing all the string arguments  */
gchar* g_strconcat(const gchar *string1,...)
{
  gsize   l;
  va_list args;
  gchar   *s;
  gchar   *concat;
  gchar   *ptr;
  if (!string1)
    return NULL;
  l = 1 + strlen (string1);
  va_start (args, string1);
  s = va_arg (args, gchar*);
  while (s)
    {
      l += strlen (s);
      s = va_arg (args, gchar*);
    }
  va_end (args);
  concat = g_new (gchar, l);
  ptr = concat;
  ptr = g_stpcpy (ptr, string1);
  va_start (args, string1);
  s = va_arg (args, gchar*);
  while (s)
    {
      ptr = g_stpcpy (ptr, s);
      s = va_arg (args, gchar*);
    }
  va_end (args);
  return concat;
}