1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package tui
import "unicode/utf8"
func cellGlyph(c Cell) string {
if c.Rune == 0 {
return ""
}
var buf [utf8.UTFMax]byte
n := utf8.EncodeRune(buf[:], c.Rune)
s := string(buf[:n])
if c.Combining != "" {
s += c.Combining
}
return s
}
|