MCPcopy Index your code
hub / github.com/git/git / utf8_width

Function utf8_width

utf8.c:198–204  ·  view source on GitHub ↗

* 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). */

Source from the content-addressed store, hash-verified

196 * a character (see pick_one_utf8_char() above).
197 */
198int 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

Callers 8

utf8_strnwidthFunction · 0.85
is_utf8Function · 0.85
strbuf_add_wrapped_textFunction · 0.85
strbuf_utf8_replaceFunction · 0.85
label_oidFunction · 0.85
pp_utf8_widthFunction · 0.85
sane_truncate_lineFunction · 0.85
utf8_ish_widthFunction · 0.85

Calls 2

pick_one_utf8_charFunction · 0.85
git_wcwidthFunction · 0.85

Tested by

no test coverage detected