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

Function gettext_width

gettext.c:132–139  ·  view source on GitHub ↗

return the number of columns of string 's' in current locale */

Source from the content-addressed store, hash-verified

130
131/* return the number of columns of string 's' in current locale */
132int gettext_width(const char *s)
133{
134 static int is_utf8 = -1;
135 if (is_utf8 == -1)
136 is_utf8 = is_utf8_locale();
137
138 return is_utf8 ? utf8_strwidth(s) : strlen(s);
139}
140#endif
141
142int is_utf8_locale(void)

Callers 1

display_ref_updateFunction · 0.50

Calls 2

is_utf8_localeFunction · 0.85
utf8_strwidthFunction · 0.85

Tested by

no test coverage detected