Compare two character arrays according to locale.
Compatibility:This function is compatible with the following targets:
|
|
#include <string.h>
int strcoll(const char *s1, const char *s2);Parameters:
Parameters for this facility are:
#include <string.h>
#include <stdio.h>
int main(void)
{
static char s1[] = "aardvark", s2[] = "xylophone";
int result;
result = strcoll(s1, s2);
if (result < 1)
printf("%s is less than %s\n", s1, s2);
else
printf("%s is equal or greater than %s\n", s1, s2);
return 0;
}
Output:
aardvark is less than xylophone
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000