package wcswidth import ( "fmt" "iter" ) var _ = fmt.Print func CharPropsFor(ch rune) CharProps { return charprops_t3[charprops_t2[(rune(charprops_t1[ch>>charprops_shift])<>graphemesegmentationresult_shift]) << graphemesegmentationresult_shift t2 := graphemesegmentationresult_t2[t1+key&graphemesegmentationresult_mask] ans := graphemesegmentationresult_t3[t2] // fmt.Printf("state: %d gsp: %d -> key: %d t1: %d -> add_to_cell: %d\n", s.State(), ch.GraphemeSegmentationProperty(), key, t1, ans.Add_to_current_cell()) return ans } func Runewidth(code rune) int { return CharPropsFor(code).Width() } func IsEmojiPresentationBase(code rune) bool { return CharPropsFor(code).Is_emoji_presentation_base() == 1 }