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

Function strspn

src/lib/string.c:112–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112size_t strspn(const char *str, const char *spn)
113{
114 size_t ret = 0;
115
116 while (*str != 0) {
117 const char *p;
118 for (p = spn; *str != *p; p++)
119 if (*p == '\0')
120 return ret;
121 ret++;
122 str++;
123 }
124 return ret;
125}
126
127size_t strcspn(const char *str, const char *spn)
128{

Callers 5

strtok_rFunction · 0.70
atolFunction · 0.70
test_strspnFunction · 0.50
print_buttonFunction · 0.50
str2msrFunction · 0.50

Calls

no outgoing calls

Tested by 1

test_strspnFunction · 0.40