### Function

# Gdk ContentFormatsparse

since: 4.4

#### Declaration [src]

    GdkContentFormats*
    gdk_content_formats_parse (
      const char* string
    )

#### Description [src]

Parses the given `string` into `GdkContentFormats` and returns the formats.

Strings printed via `gdk_content_formats_to_string()` can be read in again successfully using this function.

If `string` does not describe valid content formats, `NULL` is returned.

Available since: 4.4

#### Parameters

`string`

  Type: `const char*`

  The string to parse.

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

#### Return value

Type: `GdkContentFormats`

The content formats if `string` is valid.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.