MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / strcspn

Function strcspn

Kernel/src/string.cpp:183–192  ·  view source on GitHub ↗

strspn - Get initial length of s1 excluding the characters of s2

Source from the content-addressed store, hash-verified

181
182// strspn - Get initial length of s1 excluding the characters of s2
183size_t strcspn(const char *s1, const char *s2)
184{
185 size_t ret = 0;
186 while (*s1)
187 if (strchr(s2, *s1))
188 return ret;
189 else
190 s1++, ret++;
191 return ret;
192}
193
194// strtok - breaks str into tokens using specified delimiters
195char *strtok(char * str, const char * delim)

Callers 1

strtokFunction · 0.85

Calls 1

strchrFunction · 0.85

Tested by

no test coverage detected