### Constructor

# Gio InetAddress new_from_string

since: 2.22

#### Declaration [src]

    GInetAddress*
    g_inet_address_new_from_string (
      const gchar* string
    )

#### Description [src]

Parses `string` as an IP address and creates a new `GInetAddress`.

Available since: 2.22

#### Parameters

`string`

  Type: `const gchar*`

  A string representation of an IP address.

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

#### Return value

Type: `GInetAddress`

A new `GInetAddress` corresponding to `string`, or `NULL` if `string` could not be parsed. Free the returned object with g_object_unref().

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