Function

GLibhostname_to_ascii

since: 2.22

Declaration [src]

gchar*
g_hostname_to_ascii (
  const gchar* hostname
)

Description [src]

Converts hostname to its canonical ASCII form; an ASCII-only string containing no uppercase letters and not ending with a trailing dot.

Available since: 2.22

Parameters

hostname

Type: const gchar*

A valid UTF-8 or ASCII hostname.

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

Return value

Type: gchar*

An ASCII hostname, which must be freed, or NULL if hostname is in some way invalid.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.