3 /* strcoll( const char *, const char * )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
15 int strcoll( const char * s1, const char * s2 )
17 while ( ( *s1 ) && ( _PDCLIB_lconv.ctype[(unsigned char)*s1].collation == _PDCLIB_lconv.ctype[(unsigned char)*s2].collation ) )
22 return ( _PDCLIB_lconv.ctype[(unsigned char)*s1].collation == _PDCLIB_lconv.ctype[(unsigned char)*s2].collation );
28 #include <_PDCLIB_test.h>
32 char cmpabcde[] = "abcde";
34 TESTCASE( strcmp( abcde, cmpabcde ) == 0 );
35 TESTCASE( strcmp( abcde, abcdx ) < 0 );
36 TESTCASE( strcmp( abcdx, abcde ) > 0 );
37 TESTCASE( strcmp( empty, abcde ) < 0 );
38 TESTCASE( strcmp( abcde, empty ) > 0 );