X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstring%2Fstrcspn.c;fp=functions%2Fstring%2Fstrcspn.c;h=0000000000000000000000000000000000000000;hp=7c4d9b8c58054576394f2111ed88d259de8943aa;hb=a1f747e81dad0bb9897cb11c652403bb7bbf084c;hpb=1d9d92ba957a0b8307c9a65c35867fde68e6533b diff --git a/functions/string/strcspn.c b/functions/string/strcspn.c deleted file mode 100644 index 7c4d9b8..0000000 --- a/functions/string/strcspn.c +++ /dev/null @@ -1,27 +0,0 @@ -/* ---------------------------------------------------------------------------- - * $Id$ - * ---------------------------------------------------------------------------- - * Public Domain C Library - http://pdclib.sourceforge.net - * This code is Public Domain. Use, modify, and redistribute at will. - * --------------------------------------------------------------------------*/ - -#include <__size_t.h> - -size_t strcspn( const char * src_1, const char * src_2 ) -{ - size_t len = 0; - const char * src_p; - while ( src_1[len] != '\0' ) - { - src_p = src_2; - while ( *src_p != '\0' ) - { - if ( src_1[len] == *src_p++ ) - { - return len; - } - } - ++len; - } - return len; -}