xn--).punycodeEncodeLabel
fn
string punycodeEncodeLabel(string label) @safeEncode a single DNS label to Punycode (without adding the xn-- prefix).
Basic ASCII code points are copied; non-ASCII code points are Punycode-encoded.
Parameters
label | Unicode label to encode. |
Returns
The encoded ASCII label (without
Throws
Exception if an internal invariant is violated or output length constraints fail.