Hostname.toAscii

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

struct Hostname
static
string
toAscii
(
string hostname
)

Parameters

hostname string

a valid UTF-8 or ASCII hostname

Return Value

Type: string

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

Meta

Since

2.22