Function

GLibVariantnew_printf

Declaration

GVariant*
g_variant_new_printf (
  const gchar* format_string,
  ...
)

Description

Creates a string-type GVariant using printf formatting.

This is similar to calling g_strdup_printf() and then g_variant_new_string() but it saves a temporary variable and an unnecessary copy.

Available since:2.38

Parameters

format_string const gchar*
 

A printf-style format string.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
... none
 

Arguments for format_string.

Return value

Returns: GVariant
 

A floating reference to a new string GVariant instance.

 The data is owned by the called function.