Constants & Variables
Display
var
#
var Display *Profile = display
Display
var
#
var Display *Profile = display
Lookup
var
#
var Lookup *Profile = lookup
Lookup
var
#
var Lookup *Profile = lookup
Punycode
var
#
var Punycode *Profile = punycode
Punycode
var
#
var Punycode *Profile = punycode
Registration
var
#
var Registration *Profile = registration
Registration
var
#
var Registration *Profile = registration
UnicodeVersion
const
#
const UnicodeVersion = "12.0.0"
UnicodeVersion
const
#
const UnicodeVersion = "11.0.0"
UnicodeVersion
const
#
const UnicodeVersion = "13.0.0"
UnicodeVersion
const
#
const UnicodeVersion = "9.0.0"
UnicodeVersion
const
#
const UnicodeVersion = "15.0.0"
UnicodeVersion
const
#
const UnicodeVersion = "10.0.0"
acePrefix
const
#
const acePrefix = "xn--"
acePrefix
const
#
const acePrefix = "xn--"
attributesMask
const
#
const attributesMask = 0x1800
base
const
#
const base int32 = 36
catBigMask
const
#
const catBigMask = 0xF8
catSmallMask
const
#
const catSmallMask = 0x3
damp
const
#
const damp int32 = 700
deviation
const
#
const deviation category = 3
disallowed
const
#
const disallowed category = 0x40
disallowedSTD3Mapped
const
#
const disallowedSTD3Mapped category = 2
disallowedSTD3Valid
const
#
const disallowedSTD3Valid category = 0x80
display
var
#
var display = *ast.UnaryExpr
display
var
#
var display = *ast.UnaryExpr
idnaIndex
var
#
var idnaIndex = [2304]uint16{...}
idnaIndex
var
#
var idnaIndex = [2368]uint16{...}
idnaIndex
var
#
var idnaIndex = [2496]uint16{...}
idnaIndex
var
#
var idnaIndex = [2304]uint16{...}
idnaIndex
var
#
var idnaIndex = [2240]uint16{...}
idnaIndex
var
#
var idnaIndex = [2304]uint16{...}
idnaSparse
var
#
var idnaSparse = sparseBlocks{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseOffset
var
#
var idnaSparseOffset = []uint16{...}
idnaSparseValues
var
#
var idnaSparseValues = [1997]valueRange{...}
idnaSparseValues
var
#
var idnaSparseValues = [2123]valueRange{...}
idnaSparseValues
var
#
var idnaSparseValues = [2180]valueRange{...}
idnaSparseValues
var
#
var idnaSparseValues = [2069]valueRange{...}
idnaSparseValues
var
#
var idnaSparseValues = [1869]valueRange{...}
idnaSparseValues
var
#
var idnaSparseValues = [1915]valueRange{...}
idnaValues
var
#
var idnaValues = [8064]uint16{...}
idnaValues
var
#
var idnaValues = [8192]uint16{...}
idnaValues
var
#
var idnaValues = [8128]uint16{...}
idnaValues
var
#
var idnaValues = [8640]uint16{...}
idnaValues
var
#
var idnaValues = [8128]uint16{...}
idnaValues
var
#
var idnaValues = [8128]uint16{...}
ignored
const
#
const ignored category = 0xC0
indexShift
const
#
const indexShift = 3
initialBias
const
#
const initialBias int32 = 72
initialN
const
#
const initialN int32 = 128
inlineXOR
const
#
const inlineXOR = 0xE000
joinMask
const
#
const joinMask = 0x07
joinShift
const
#
const joinShift = 8
joinStates
var
#
var joinStates = [][numJoinTypes]joinState{...}
joinStates
var
#
var joinStates = [][numJoinTypes]joinState{...}
joinVirama
const
#
const joinVirama
joinZWJ
const
#
const joinZWJ
joinZWNJ
const
#
const joinZWNJ
joiningD
const
#
const joiningD
joiningL
const
#
const joiningL = *ast.ParenExpr
joiningR
const
#
const joiningR
joiningT
const
#
const joiningT
lookup
var
#
var lookup = *ast.UnaryExpr
lookup
var
#
var lookup = *ast.UnaryExpr
mapped
const
#
const mapped category = 1
mappingIndex
var
#
var mappingIndex = []uint16{...}
mappingIndex
var
#
var mappingIndex = []uint16{...}
mappings
var
#
var mappings string = *ast.BinaryExpr
mappings
var
#
var mappings string = *ast.BinaryExpr
mappings
var
#
var mappings string = *ast.BinaryExpr
mappings
var
#
var mappings string = *ast.BinaryExpr
mappings
var
#
var mappings string = *ast.BinaryExpr
mappings
var
#
var mappings string = *ast.BinaryExpr
mayNeedNorm
const
#
const mayNeedNorm = 0x2000
modifier
const
#
const modifier = 0x1000
numJoinTypes
const
#
const numJoinTypes
punycode
var
#
var punycode = *ast.UnaryExpr
punycode
var
#
var punycode = *ast.UnaryExpr
registration
var
#
var registration = *ast.UnaryExpr
registration
var
#
var registration = *ast.UnaryExpr
rtl
const
#
const rtl = 0x0800
skew
const
#
const skew int32 = 38
stateAfter
const
#
const stateAfter
stateAfter
const
#
const stateAfter
stateBefore
const
#
const stateBefore
stateBefore
const
#
const stateBefore
stateBeforeVirama
const
#
const stateBeforeVirama
stateBeforeVirama
const
#
const stateBeforeVirama
stateFAIL
const
#
const stateFAIL
stateFAIL
const
#
const stateFAIL
stateStart
const
#
const stateStart joinState = iota
stateStart
const
#
const stateStart joinState = iota
stateVirama
const
#
const stateVirama
stateVirama
const
#
const stateVirama
tmax
const
#
const tmax int32 = 26
tmin
const
#
const tmin int32 = 1
transitionalLookup
const
#
const transitionalLookup = false
transitionalLookup
const
#
const transitionalLookup = true
trie
var
#
var trie = *ast.UnaryExpr
unknown
const
#
const unknown category = 0
valid
const
#
const valid category = 0x08
validNV8
const
#
const validNV8 category = 0x18
validXV8
const
#
const validXV8 category = 0x28
viramaModifier
const
#
const viramaModifier = 0x1800
xorBit
const
#
const xorBit = 0x4
xorData
var
#
var xorData string = *ast.BinaryExpr
xorData
var
#
var xorData string = *ast.BinaryExpr
xorData
var
#
var xorData string = *ast.BinaryExpr
xorData
var
#
var xorData string = *ast.BinaryExpr
xorData
var
#
var xorData string = *ast.BinaryExpr
xorData
var
#
var xorData string = *ast.BinaryExpr
zwj
const
#
const zwj = "\u200d"
zwj
const
#
const zwj = "\u200d"
zwnj
const
#
const zwnj = "\u200c"
zwnj
const
#
const zwnj = "\u200c"
Functions
BidiRule
function
#
BidiRule enables the Bidi rule as defined in RFC 5893. Any application
that relies on proper validation of labels should include this rule.
This option corresponds to the CheckBidi flag in UTS #46.
func BidiRule() Option
BidiRule
function
#
BidiRule enables the Bidi rule as defined in RFC 5893. Any application
that relies on proper validation of labels should include this rule.
This option corresponds to the CheckBidi flag in UTS #46.
func BidiRule() Option
CheckHyphens
function
#
CheckHyphens sets whether to check for correct use of hyphens ('-') in
labels. Most web browsers do not have this option set, since labels such as
"r3---sn-apo3qvuoxuxbt-j5pe" are in common use.
This option corresponds to the CheckHyphens flag in UTS #46.
func CheckHyphens(enable bool) Option
CheckHyphens
function
#
CheckHyphens sets whether to check for correct use of hyphens ('-') in
labels. Most web browsers do not have this option set, since labels such as
"r3---sn-apo3qvuoxuxbt-j5pe" are in common use.
This option corresponds to the CheckHyphens flag in UTS #46.
func CheckHyphens(enable bool) Option
CheckJoiners
function
#
CheckJoiners sets whether to check the ContextJ rules as defined in Appendix
A of RFC 5892, concerning the use of joiner runes.
This option corresponds to the CheckJoiners flag in UTS #46.
func CheckJoiners(enable bool) Option
CheckJoiners
function
#
CheckJoiners sets whether to check the ContextJ rules as defined in Appendix
A of RFC 5892, concerning the use of joiner runes.
This option corresponds to the CheckJoiners flag in UTS #46.
func CheckJoiners(enable bool) Option
Error
method
#
func (e labelError) Error() string
Error
method
#
func (e runeError) Error() string
Error
method
#
func (e labelError) Error() string
Error
method
#
func (e runeError) Error() string
MapForLookup
function
#
MapForLookup sets validation and mapping options such that a given IDN is
transformed for domain name lookup according to the requirements set out in
Section 5 of RFC 5891. The mappings follow the recommendations of RFC 5894,
RFC 5895 and UTS 46. It does not add the Bidi Rule. Use the BidiRule option
to add this check.
The mappings include normalization and mapping case, width and other
compatibility mappings.
func MapForLookup() Option
MapForLookup
function
#
MapForLookup sets validation and mapping options such that a given IDN is
transformed for domain name lookup according to the requirements set out in
Section 5 of RFC 5891. The mappings follow the recommendations of RFC 5894,
RFC 5895 and UTS 46. It does not add the Bidi Rule. Use the BidiRule option
to add this check.
The mappings include normalization and mapping case, width and other
compatibility mappings.
func MapForLookup() Option
New
function
#
New creates a new Profile.
With no options, the returned Profile is the most permissive and equals the
Punycode Profile. Options can be passed to further restrict the Profile. The
MapForLookup and ValidateForRegistration options set a collection of options,
for lookup and registration purposes respectively, which can be tailored by
adding more fine-grained options, where later options override earlier
options.
func New(o ...Option) *Profile
New
function
#
New creates a new Profile.
With no options, the returned Profile is the most permissive and equals the
Punycode Profile. Options can be passed to further restrict the Profile. The
MapForLookup and ValidateForRegistration options set a collection of options,
for lookup and registration purposes respectively, which can be tailored by
adding more fine-grained options, where later options override earlier
options.
func New(o ...Option) *Profile
RemoveLeadingDots
function
#
RemoveLeadingDots removes leading label separators. Leading runes that map to
dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well.
func RemoveLeadingDots(remove bool) Option
RemoveLeadingDots
function
#
RemoveLeadingDots removes leading label separators. Leading runes that map to
dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well.
func RemoveLeadingDots(remove bool) Option
StrictDomainName
function
#
StrictDomainName limits the set of permissible ASCII characters to those
allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the
hyphen). This is set by default for MapForLookup and ValidateForRegistration,
but is only useful if ValidateLabels is set.
This option is useful, for instance, for browsers that allow characters
outside this range, for example a '_' (U+005F LOW LINE). See
http://www.rfc-editor.org/std/std3.txt for more details.
This option corresponds to the UseSTD3ASCIIRules flag in UTS #46.
func StrictDomainName(use bool) Option
StrictDomainName
function
#
StrictDomainName limits the set of permissible ASCII characters to those
allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the
hyphen). This is set by default for MapForLookup and ValidateForRegistration,
but is only useful if ValidateLabels is set.
This option is useful, for instance, for browsers that allow characters
outside this range, for example a '_' (U+005F LOW LINE). See
http://www.rfc-editor.org/std/std3.txt for more details.
This option corresponds to the UseSTD3ASCIIRules flag in UTS #46.
func StrictDomainName(use bool) Option
String
method
#
String reports a string with a description of the profile for debugging
purposes. The string format may change with different versions.
func (p *Profile) String() string
String
method
#
String reports a string with a description of the profile for debugging
purposes. The string format may change with different versions.
func (p *Profile) String() string
ToASCII
function
#
ToASCII is a wrapper for Punycode.ToASCII.
func ToASCII(s string) (string, error)
ToASCII
method
#
ToASCII converts a domain or domain label to its ASCII form. For example,
ToASCII("bücher.example.com") is "xn--bcher-kva.example.com", and
ToASCII("golang") is "golang". If an error is encountered it will return
an error and a (partially) processed result.
func (p *Profile) ToASCII(s string) (string, error)
ToASCII
function
#
ToASCII is a wrapper for Punycode.ToASCII.
func ToASCII(s string) (string, error)
ToASCII
method
#
ToASCII converts a domain or domain label to its ASCII form. For example,
ToASCII("bücher.example.com") is "xn--bcher-kva.example.com", and
ToASCII("golang") is "golang". If an error is encountered it will return
an error and a (partially) processed result.
func (p *Profile) ToASCII(s string) (string, error)
ToUnicode
function
#
ToUnicode is a wrapper for Punycode.ToUnicode.
func ToUnicode(s string) (string, error)
ToUnicode
method
#
ToUnicode converts a domain or domain label to its Unicode form. For example,
ToUnicode("xn--bcher-kva.example.com") is "bücher.example.com", and
ToUnicode("golang") is "golang". If an error is encountered it will return
an error and a (partially) processed result.
func (p *Profile) ToUnicode(s string) (string, error)
ToUnicode
function
#
ToUnicode is a wrapper for Punycode.ToUnicode.
func ToUnicode(s string) (string, error)
ToUnicode
method
#
ToUnicode converts a domain or domain label to its Unicode form. For example,
ToUnicode("xn--bcher-kva.example.com") is "bücher.example.com", and
ToUnicode("golang") is "golang". If an error is encountered it will return
an error and a (partially) processed result.
func (p *Profile) ToUnicode(s string) (string, error)
Transitional
function
#
Transitional sets a Profile to use the Transitional mapping as defined in UTS
#46. This will cause, for example, "ß" to be mapped to "ss". Using the
transitional mapping provides a compromise between IDNA2003 and IDNA2008
compatibility. It is used by some browsers when resolving domain names. This
option is only meaningful if combined with MapForLookup.
func Transitional(transitional bool) Option
Transitional
function
#
Transitional sets a Profile to use the Transitional mapping as defined in UTS
#46. This will cause, for example, "ß" to be mapped to "ss". Using the
transitional mapping provides a compromise between IDNA2003 and IDNA2008
compatibility. It is used by some browsers when resolving domain names. This
option is only meaningful if combined with MapForLookup.
func Transitional(transitional bool) Option
ValidateForRegistration
function
#
ValidateForRegistration sets validation options to verify that a given IDN is
properly formatted for registration as defined by Section 4 of RFC 5891.
func ValidateForRegistration() Option
ValidateForRegistration
function
#
ValidateForRegistration sets validation options to verify that a given IDN is
properly formatted for registration as defined by Section 4 of RFC 5891.
func ValidateForRegistration() Option
ValidateLabels
function
#
ValidateLabels sets whether to check the mandatory label validation criteria
as defined in Section 5.4 of RFC 5891. This includes testing for correct use
of hyphens ('-'), normalization, validity of runes, and the context rules.
In particular, ValidateLabels also sets the CheckHyphens and CheckJoiners flags
in UTS #46.
func ValidateLabels(enable bool) Option
ValidateLabels
function
#
ValidateLabels sets whether to check the mandatory label validation criteria
as defined in Section 5.4 of RFC 5891. This includes testing for correct use
of hyphens ('-'), normalization, validity of runes, and the context rules.
In particular, ValidateLabels also sets the CheckHyphens and CheckJoiners flags
in UTS #46.
func ValidateLabels(enable bool) Option
VerifyDNSLength
function
#
VerifyDNSLength sets whether a Profile should fail if any of the IDN parts
are longer than allowed by the RFC.
This option corresponds to the VerifyDnsLength flag in UTS #46.
func VerifyDNSLength(verify bool) Option
VerifyDNSLength
function
#
VerifyDNSLength sets whether a Profile should fail if any of the IDN parts
are longer than allowed by the RFC.
This option corresponds to the VerifyDnsLength flag in UTS #46.
func VerifyDNSLength(verify bool) Option
adapt
function
#
adapt is the bias adaptation function specified in section 6.1.
func adapt(delta int32, numPoints int32, firstTime bool) int32
appendMapping
method
#
appendMapping appends the mapping for the respective rune. isMapped must be
true. A mapping is a categorization of a rune as defined in UTS #46.
func (c info) appendMapping(b []byte, s string) []byte
appendMapping
method
#
appendMapping appends the mapping for the respective rune. isMapped must be
true. A mapping is a categorization of a rune as defined in UTS #46.
func (c info) appendMapping(b []byte, s string) []byte
apply
function
#
func apply(o *options, opts []Option)
apply
function
#
func apply(o *options, opts []Option)
ascii
function
#
func ascii(s string) bool
ascii
function
#
func ascii(s string) bool
category
method
#
func (c info) category() category
code
method
#
func (e labelError) code() string
code
method
#
func (e runeError) code() string
code
method
#
func (e labelError) code() string
code
method
#
func (e runeError) code() string
decode
function
#
decode decodes a string as specified in section 6.2.
func decode(encoded string) (string, error)
decodeDigit
function
#
func decodeDigit(x byte) (digit int32, ok bool)
done
method
#
func (l *labelIter) done() bool
done
method
#
func (l *labelIter) done() bool
encode
function
#
encode encodes a string as specified in section 6.3 and prepends prefix to
the result.
The "while h < length(input)" line in the specification becomes "for
remaining != 0" in the Go code, because len(s) in Go is in bytes, not runes.
func encode(prefix string, s string) (string, error)
encodeDigit
function
#
func encodeDigit(digit int32) byte
isBidi
method
#
func (c info) isBidi(s string) bool
isMapped
method
#
func (c info) isMapped() bool
isModifier
method
#
func (c info) isModifier() bool
isViramaModifier
method
#
func (c info) isViramaModifier() bool
joinType
method
#
func (c info) joinType() info
label
method
#
func (l *labelIter) label() string
label
method
#
func (l *labelIter) label() string
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookup(s []byte) (v uint16, sz int)
lookup
method
#
lookup determines the type of block n and looks up the value for b.
For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
is a list of ranges with an accompanying value. Given a matching range r,
the value for b is by r.value + (b - r.lo) * stride.
func (t *sparseBlocks) lookup(n uint32, b byte) uint16
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupString
method
#
lookupString returns the trie value for the first UTF-8 encoding in s and
the width in bytes of this encoding. The size will be 0 if s does not
hold enough bytes to complete the encoding. len(s) must be greater than 0.
func (t *idnaTrie) lookupString(s string) (v uint16, sz int)
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupStringUnsafe
method
#
lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupStringUnsafe(s string) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupUnsafe
method
#
lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
s must start with a full and valid UTF-8 encoded rune.
func (t *idnaTrie) lookupUnsafe(s []byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
lookupValue
method
#
lookupValue determines the type of block n and looks up the value for b.
func (t *idnaTrie) lookupValue(n uint32, b byte) uint16
madd
function
#
madd computes a + (b * c), detecting overflow.
func madd(a int32, b int32, c int32) (next int32, overflow bool)
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
newIdnaTrie
function
#
func newIdnaTrie(i int) *idnaTrie
next
method
#
next sets the value to the next label. It skips the last label if it is empty.
func (l *labelIter) next()
next
method
#
next sets the value to the next label. It skips the last label if it is empty.
func (l *labelIter) next()
normalize
function
#
func normalize(p *Profile, s string) (string, error)
normalize
function
#
func normalize(p *Profile, s string) (mapped string, isBidi bool, err error)
process
method
#
process implements the algorithm described in section 4 of UTS #46,
see https://www.unicode.org/reports/tr46.
func (p *Profile) process(s string, toASCII bool) (string, error)
process
method
#
process implements the algorithm described in section 4 of UTS #46,
see https://www.unicode.org/reports/tr46.
func (p *Profile) process(s string, toASCII bool) (string, error)
punyError
function
#
func punyError(s string) error
reset
method
#
func (l *labelIter) reset()
reset
method
#
func (l *labelIter) reset()
result
method
#
func (l *labelIter) result() string
result
method
#
func (l *labelIter) result() string
set
method
#
func (l *labelIter) set(s string)
set
method
#
func (l *labelIter) set(s string)
simplify
method
#
func (p *Profile) simplify(cat category) category
simplify
method
#
func (p *Profile) simplify(cat category) category
validateAndMap
function
#
func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error)
validateAndMap
function
#
func validateAndMap(p *Profile, s string) (string, error)
validateFromPunycode
function
#
func validateFromPunycode(p *Profile, s string) error
validateFromPunycode
function
#
func validateFromPunycode(p *Profile, s string) error
validateLabel
method
#
validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are
already implicitly satisfied by the overall implementation.
func (p *Profile) validateLabel(s string) (err error)
validateLabel
method
#
validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are
already implicitly satisfied by the overall implementation.
func (p *Profile) validateLabel(s string) error
validateRegistration
function
#
func validateRegistration(p *Profile, s string) (idem string, bidi bool, err error)
validateRegistration
function
#
func validateRegistration(p *Profile, s string) (string, error)