Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / strcoll_l.c
blob89a7d053544f13dec5f3948ac3178f7b97d380e5
1 /*
2 FUNCTION
3 <<strcoll_l>>---locale-specific character string compare
5 INDEX
6 strcoll_l
8 SYNOPSIS
9 #include <string.h>
10 int strcoll_l(const char *<[stra]>, const char * <[strb]>,
11 locale_t <[locale]>);
13 DESCRIPTION
14 <<strcoll_l>> compares the string pointed to by <[stra]> to
15 the string pointed to by <[strb]>, using an interpretation
16 appropriate to the current <<LC_COLLATE>> state.
18 (NOT Cygwin:) The current implementation of <<strcoll_l>> simply
19 uses <<strcmp>> and does not support any language-specific sorting.
21 If <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the
22 behaviour is undefined.
24 RETURNS
25 If the first string is greater than the second string,
26 <<strcoll_l>> returns a number greater than zero. If the two
27 strings are equivalent, <<strcoll_l>> returns zero. If the first
28 string is less than the second string, <<strcoll_l>> returns a
29 number less than zero.
31 PORTABILITY
32 <<strcoll_l>> is POSIX-1.2008.
34 <<strcoll_l>> requires no supporting OS subroutines.
36 QUICKREF
37 strcoll_l ansi pure
40 #include <string.h>
42 int
43 strcoll_l (const char *a, const char *b, struct __locale_t *locale)
45 return strcmp (a, b);