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

Function strvec_split

strvec.c:110–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void strvec_split(struct strvec *array, const char *to_split)
111{
112 while (isspace(*to_split))
113 to_split++;
114 for (;;) {
115 const char *p = to_split;
116
117 if (!*p)
118 break;
119
120 while (*p && !isspace(*p))
121 p++;
122 strvec_push_nodup(array, xstrndup(to_split, p - to_split));
123
124 while (isspace(*p))
125 p++;
126 to_split = p;
127 }
128}
129
130void strvec_clear(struct strvec *array)
131{

Calls 2

strvec_push_nodupFunction · 0.85
xstrndupFunction · 0.85