Function

GLibhostname_to_ascii

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 const gchar*
 

A valid UTF-8 or ASCII hostname.

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

Return value

Returns: 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 string is a NUL terminated UTF-8 string.