(r rune)
| 177 | } |
| 178 | |
| 179 | func runeDisplayWidth(r rune) int { |
| 180 | if r == 0 { |
| 181 | return 0 |
| 182 | } |
| 183 | if r < 32 || (r >= 0x7f && r < 0xa0) { |
| 184 | return 0 |
| 185 | } |
| 186 | if isWideRune(r) { |
| 187 | return 2 |
| 188 | } |
| 189 | return 1 |
| 190 | } |
| 191 | |
| 192 | func isWideRune(r rune) bool { |
| 193 | if r < 0x1100 { |
no test coverage detected