GLib.Variant.new_printf
Description: Reference for GLib.Variant.new_printf

### Function

# GLib Variantnew_printf

since: 2.38

#### Declaration [src]

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

#### Description [src]

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

This function is not directly available to language bindings.

#### Parameters

`format_string`

  Type: `const gchar*`

  A printf-style format string.

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

`...`

  Type: ``

  Arguments for `format_string`.

#### Return value

Type: `GVariant`

A floating reference to a new string `GVariant` instance.

The data is owned by the called function.