meta: move photon/libc to root
This commit is contained in:
15
libc/string/strcspn.c
Normal file
15
libc/string/strcspn.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stddef.h>
|
||||
|
||||
size_t strcspn(const char *str1, const char *str2)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; str1[i]; i++) {
|
||||
for (size_t ii = 0; str2[ii]; ii++) {
|
||||
if (str1[i] == str2[ii]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
Reference in New Issue
Block a user