module

SimpleIdn::Punycode

Constants

BASE = 36
DAMP = 700
DELIMITER = 45_u8
INITIAL_BIAS = 72
INITIAL_N = 128
MAXINT = 2147483647
SKEW = 38
TMAX = 26
TMIN = 1

Class methods

adapt(delta, numpoints, firsttime)

Bias adaptation function

Source
decode(input : Slice(UInt8))

Main decode

Source
decode_digit(cp)

decode_digit(cp) returns the numeric value of a basic code point (for use in representing integers) in the range 0 to base-1, or base if cp is does not represent a value.

Source
encode(input : String, &)

Main encode function

Source
encode_basic(bcp, flag)

encode_basic(bcp,flag) forces a basic code point to lowercase if flag is zero, uppercase if flag is nonzero, and returns the resulting code point. The code point is unchanged if it is caseless. The behavior is undefined if bcp is not a basic code point.

Source
encode_digit(d)

encode_digit(d,flag) returns the basic code point whose value (when used for representing integers) is d, which needs to be in the range 0 to base-1. The lowercase form is used unless flag is nonzero, in which case the uppercase form is used. The behavior is undefined if flag is nonzero and digit d has no uppercase form.

Source