GLib.VariantType.string_scan
Description: Reference for GLib.VariantType.string_scan

### Function

# GLib VariantTypestring_scan

since: 2.24

#### Declaration [src]

    gboolean
    g_variant_type_string_scan (
      const gchar* string,
      const gchar* limit,
      const gchar** endptr
    )

#### Description [src]

Scan for a single complete and valid GVariant type string in `string`.

The memory pointed to by `limit` (or bytes beyond it) is never accessed.

If a valid type string is found, `endptr` is updated to point to the first character past the end of the string that was found and `TRUE` is returned.

If there is no valid type string starting at `string`, or if the type string does not end before `limit` then `FALSE` is returned.

For the simple case of checking if a string is a valid type string, see `g_variant_type_string_is_valid()`.

Available since: 2.24

#### Parameters

`string`

  Type: `const gchar*`

  A pointer to any string.

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

`limit`

  Type: `const gchar*`

  The end of `string`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`endptr`

  Type: `const gchar**`

  Location to store the end pointer.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the returned data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gboolean`

True if a valid type string was found.