files
kolibrios/programs/develop/ktcc/libc.obj/source/string/strspn.c
Andrew 42e77931bf
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 25s
Build system / Build (pull_request) Failing after 27s
develop/ktcc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files.
2025-05-24 11:48:18 +01:00

16 lines
332 B
C

/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <string.h>
size_t strspn(const char* s1, const char* s2)
{
const char *p = s1, *spanp;
char c, sc;
cont:
c = *p++;
for (spanp = s2; (sc = *spanp++) != 0;)
if (sc == c)
goto cont;
return (p - 1 - s1);
}