utf8Decode is a thin wrapper. Kept separate so future width-aware logic (e.g. CJK double-width) can slot in here.
(s string)
| 315 | // utf8Decode is a thin wrapper. Kept separate so future width-aware |
| 316 | // logic (e.g. CJK double-width) can slot in here. |
| 317 | func utf8Decode(s string) (rune, int) { |
| 318 | if len(s) == 0 { |
| 319 | return 0, 0 |
| 320 | } |
| 321 | r, size := utf8.DecodeRuneInString(s) |
| 322 | return r, size |
| 323 | } |
| 324 | |
| 325 | // effectiveStyleAt returns the SGR sequence active at visual column `col` |
| 326 | // within string `s` — i.e., the last CSI seen before that column. An |
no outgoing calls
no test coverage detected