parent
8368ba70fd
commit
cda27ac2db
@ -0,0 +1,8 @@
|
||||
#include <string.h>
|
||||
|
||||
size_t strcspn(char const *s, char const *reject)
|
||||
{
|
||||
size_t i = 0;
|
||||
while(s[i] && !strchr(reject, s[i])) i++;
|
||||
return i;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
#include <string.h>
|
||||
|
||||
size_t strspn(char const *s, char const *accept)
|
||||
{
|
||||
size_t i = 0;
|
||||
while(s[i] && strchr(accept, s[i])) i++;
|
||||
return i;
|
||||
}
|
Loading…
Reference in new issue