MCPcopy Create free account
hub / github.com/git/git / display_mode_esc_sequence_len

Function display_mode_esc_sequence_len

utf8.c:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19size_t display_mode_esc_sequence_len(const char *s)
20{
21 const char *p = s;
22 if (*p++ != '\033')
23 return 0;
24 if (*p++ != '[')
25 return 0;
26 while (isdigit(*p) || *p == ';')
27 p++;
28 if (*p++ != 'm')
29 return 0;
30 return p - s;
31}
32
33/* auxiliary function for binary search in interval table */
34static int bisearch(ucs_char_t ucs, const struct interval *table, int max)

Callers 4

utf8_strnwidthFunction · 0.85
strbuf_add_wrapped_textFunction · 0.85
strbuf_utf8_replaceFunction · 0.85
format_and_pad_commitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected