type Properties … var trie … // Class returns the Bidi class for p. func (p Properties) Class() Class { … } // IsBracket reports whether the rune is a bracket. func (p Properties) IsBracket() bool { … } // IsOpeningBracket reports whether the rune is an opening bracket. // IsBracket must return true. func (p Properties) IsOpeningBracket() bool { … } // TODO: find a better API and expose. func (p Properties) reverseBracket(r rune) rune { … } var controlByteToClass … // LookupRune returns properties for r. func LookupRune(r rune) (p Properties, size int) { … } // Lookup returns properties for the first rune in s and the width in bytes of // its encoding. The size will be 0 if s does not hold enough bytes to complete // the encoding. func Lookup(s []byte) (p Properties, sz int) { … } // LookupString returns properties for the first rune in s and the width in // bytes of its encoding. The size will be 0 if s does not hold enough bytes to // complete the encoding. func LookupString(s string) (p Properties, sz int) { … }