Documentation
¶
Index ¶
- Constants
- Variables
- func Beautify(name string) string
- func FlattenTokens(tokens []OutputToken) []rune
- func Join(labels []string) string
- func Normalize(name string) string
- func Split(name string) []string
- func ToHexSequence(cps []rune) string
- type ENSIP15
- func (l *ENSIP15) ASCIIGroup() *Group
- func (l *ENSIP15) Beautify(name string) (string, error)
- func (l *ENSIP15) EmojiGroup() *Group
- func (l *ENSIP15) Emojis() (v []EmojiSequence)
- func (l *ENSIP15) FindGroup(name string) *Group
- func (l *ENSIP15) GetMapped(cp rune) []rune
- func (l *ENSIP15) Groups() (v []*Group)
- func (l *ENSIP15) Ignored() util.RuneSet
- func (l *ENSIP15) NF() *nf.NF
- func (l *ENSIP15) Normalize(name string) (string, error)
- func (l *ENSIP15) NormalizeFragment(frag string, decompose bool) (string, error)
- func (l *ENSIP15) ParseEmojiAt(cps []rune, pos int) (emoji *EmojiSequence, end int)
- func (l *ENSIP15) SafeCodepoint(cp rune) string
- func (l *ENSIP15) SafeImplode(cps []rune) string
- func (l *ENSIP15) ShouldEscape() util.RuneSet
- type EmojiNode
- type EmojiSequence
- type Group
- type OutputToken
- type Whole
Constants ¶
View Source
const ( FE0F = 0xFE0F ZWJ = 0x200D )
Variables ¶
View Source
var ( ErrInvalidLabelExtension = fmt.Errorf("invalid label extension") ErrIllegalMixture = fmt.Errorf("illegal mixture") ErrWholeConfusable = fmt.Errorf("whole-script confusable") ErrLeadingUnderscore = fmt.Errorf("underscore allowed only at start") ErrFencedLeading = fmt.Errorf("leading fenced") ErrFencedAdjacent = fmt.Errorf("adjacent fenced") ErrFencedTrailing = fmt.Errorf("trailing fenced") ErrDisallowedCharacter = fmt.Errorf("disallowed character") ErrEmptyLabel = fmt.Errorf("empty label") ErrCMLeading = fmt.Errorf("leading combining mark") ErrCMAfterEmoji = fmt.Errorf("emoji + combining mark") ErrNSMDuplicate = fmt.Errorf("duplicate non-spacing marks") ErrNSMExcessive = fmt.Errorf("excessive non-spacing marks") )
Functions ¶
func FlattenTokens ¶
func FlattenTokens(tokens []OutputToken) []rune
func ToHexSequence ¶
Types ¶
type ENSIP15 ¶
type ENSIP15 struct {
// contains filtered or unexported fields
}
func (*ENSIP15) ASCIIGroup ¶
func (*ENSIP15) EmojiGroup ¶
func (*ENSIP15) Emojis ¶
func (l *ENSIP15) Emojis() (v []EmojiSequence)
func (*ENSIP15) NormalizeFragment ¶
func (*ENSIP15) ParseEmojiAt ¶
func (l *ENSIP15) ParseEmojiAt(cps []rune, pos int) (emoji *EmojiSequence, end int)
func (*ENSIP15) SafeCodepoint ¶
func (*ENSIP15) SafeImplode ¶
func (*ENSIP15) ShouldEscape ¶
type EmojiSequence ¶
type EmojiSequence struct {
// contains filtered or unexported fields
}
func (EmojiSequence) Beautified ¶
func (seq EmojiSequence) Beautified() string
func (EmojiSequence) HasZWJ ¶
func (seq EmojiSequence) HasZWJ() bool
func (EmojiSequence) IsMangled ¶
func (seq EmojiSequence) IsMangled() bool
func (EmojiSequence) Normalized ¶
func (seq EmojiSequence) Normalized() string
func (EmojiSequence) String ¶
func (seq EmojiSequence) String() string
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) IsRestricted ¶
type OutputToken ¶
type OutputToken struct { Codepoints []rune Emoji *EmojiSequence }
func (OutputToken) String ¶
func (ot OutputToken) String() string
Click to show internal directories.
Click to hide internal directories.