/* Writes a formatted string into a #GString. This is similar to the standard sprintf() function, except that the #GString buffer automatically expands to contain the results. The previous contents of the #GString are destroyed.  */
void g_string_printf(GString *string, const gchar *format,...)
/* Writes a formatted string into a #GString. This is similar to the standard sprintf() function, except that the #GString buffer automatically expands to contain the results. The previous contents of the #GString are destroyed.  */
void g_string_printf(GString *string, const gchar *format,...)
{
  va_list args;
  g_string_truncate (string, 0);
  va_start (args, format);
  g_string_append_vprintf (string, format, args);
  va_end (args);
}