* This function returns the number of columns occupied by the character * pointed to by the variable start. The pointer is updated to point at * the next character. When remainder_p is not NULL, it points at the * location that stores the number of remaining bytes we can use to pick * a character (see pick_one_utf8_char() above). */
| 196 | * a character (see pick_one_utf8_char() above). |
| 197 | */ |
| 198 | int utf8_width(const char **start, size_t *remainder_p) |
| 199 | { |
| 200 | ucs_char_t ch = pick_one_utf8_char(start, remainder_p); |
| 201 | if (!*start) |
| 202 | return 0; |
| 203 | return git_wcwidth(ch); |
| 204 | } |
| 205 | |
| 206 | /* |
| 207 | * Returns the total number of columns required by a null-terminated |
no test coverage detected