Function

GLibhostname_to_ascii

Declaration

gchar*
g_hostname_to_ascii (
  const gchar* hostname
)

Description

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