func printMsgf(term Terminal, x, y int, fg, bg uint16, format string, args ...interface{}) { msg := fmt.Sprintf(format, args...) for _, c := range msg { term.SetCell(x, y, c, fg, bg) x += runewidth.RuneWidth(c) } }
func BenchmarkOtherlib1(b *testing.B) { for n := 0; n < b.N; n++ { _ = mattn.RuneWidth('コ') } }
func charWidth(ch rune) int { return rw.RuneWidth(ch) }