Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 8
Compare two strings, using the locale's collating sequence
#include <string.h>
int strcoll( const char* s1,
const char* s2 );
- s1, s2
- The strings that you want to compare.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The strcoll() function compares the strings pointed to by
s1 and s2, using
the collating sequence selected by the
setlocale() function.
The strcoll() function is equivalent to
strcmp()
when the
collating sequence is selected from the "C" locale.
- < 0
- s1 is less than s2.
- 0
- s1 is equal to s2.
- > 0
- s1 is greater than s2.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char buffer[80] = "world";
int main( void )
{
if( strcoll( buffer, "Hello" ) < 0 ) {
printf( "Less than\n" );
}
return EXIT_SUCCESS;
}
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
Yes |
Signal handler |
Yes |
Thread |
Yes |
setlocale(),
strcasecmp(),
strcmp(),
strcmpi(),
stricmp(),
strncasecmp(),
strncmp(),
strnicmp(),
wcscmp(),
wcscoll(),
wcsncmp()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 161
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/strcoll.html on line 161