1 /* wcscspn( const wchar_t *, const wchar_t * )
\r
3 This file is part of the Public Domain C Library (PDCLib).
\r
4 Permission is granted to use, modify, and / or redistribute at will.
\r
11 size_t wcscspn( const wchar_t * s1, const wchar_t * s2 )
\r
20 if ( s1[len] == *p++ )
\r
33 #include <_PDCLIB_test.h>
\r
37 TESTCASE( wcscspn( wabcde, L"x" ) == 5 );
\r
38 TESTCASE( wcscspn( wabcde, L"xyz" ) == 5 );
\r
39 TESTCASE( wcscspn( wabcde, L"zyx" ) == 5 );
\r
40 TESTCASE( wcscspn( wabcdx, L"x" ) == 4 );
\r
41 TESTCASE( wcscspn( wabcdx, L"xyz" ) == 4 );
\r
42 TESTCASE( wcscspn( wabcdx, L"zyx" ) == 4 );
\r
43 TESTCASE( wcscspn( wabcde, L"a" ) == 0 );
\r
44 TESTCASE( wcscspn( wabcde, L"abc" ) == 0 );
\r
45 TESTCASE( wcscspn( wabcde, L"cba" ) == 0 );
\r
46 return TEST_RESULTS;
\r