MCPcopy Create free account
hub / github.com/coreboot/coreboot / strcspn

Function strcspn

src/lib/string.c:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127size_t strcspn(const char *str, const char *spn)
128{
129 size_t ret = 0;
130
131 while (*str != 0) {
132 const char *p;
133 for (p = spn; *p != '\0'; p++)
134 if (*p == *str)
135 return ret;
136 ret++;
137 str++;
138 }
139 return ret;
140}
141
142char *strstr(const char *haystack, const char *needle)
143{

Callers 4

strtok_rFunction · 0.70
test_strcspnFunction · 0.50
escape_string_valueFunction · 0.50
str2msrFunction · 0.50

Calls

no outgoing calls

Tested by 1

test_strcspnFunction · 0.40