sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* FUNCTION
|
sl@0
|
16 |
* <<strcoll>>---locale specific character string compare
|
sl@0
|
17 |
* INDEX
|
sl@0
|
18 |
* strcoll
|
sl@0
|
19 |
* ANSI_SYNOPSIS
|
sl@0
|
20 |
* #include <string.h>
|
sl@0
|
21 |
* int strcoll(const char *<[stra]>, const char * <[strb]>);
|
sl@0
|
22 |
* TRAD_SYNOPSIS
|
sl@0
|
23 |
* #include <string.h>
|
sl@0
|
24 |
* int strcoll(<[stra]>, <[strb]>)
|
sl@0
|
25 |
* char *<[stra]>;
|
sl@0
|
26 |
* char *<[strb]>;
|
sl@0
|
27 |
* <<strcoll>> compares the string pointed to by <[stra]> to
|
sl@0
|
28 |
* the string pointed to by <[strb]>, using an interpretation
|
sl@0
|
29 |
* appropriate to the current <<LC_COLLATE>> state.
|
sl@0
|
30 |
* RETURNS
|
sl@0
|
31 |
* If the first string is greater than the second string,
|
sl@0
|
32 |
* <<strcoll>> returns a number greater than zero. If the two
|
sl@0
|
33 |
* strings are equivalent, <<strcoll>> returns zero. If the first
|
sl@0
|
34 |
* string is less than the second string, <<strcoll>> returns a
|
sl@0
|
35 |
* number less than zero.
|
sl@0
|
36 |
* PORTABILITY
|
sl@0
|
37 |
* <<strcoll>> is ANSI C.
|
sl@0
|
38 |
* <<strcoll>> requires no supporting OS subroutines.
|
sl@0
|
39 |
* QUICKREF
|
sl@0
|
40 |
* strcoll ansi pure
|
sl@0
|
41 |
*
|
sl@0
|
42 |
*
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
|
sl@0
|
45 |
|
sl@0
|
46 |
|
sl@0
|
47 |
#include <string.h>
|
sl@0
|
48 |
|
sl@0
|
49 |
/**
|
sl@0
|
50 |
Compares a to b character by character according to the character table
|
sl@0
|
51 |
set by current locale.
|
sl@0
|
52 |
This function starts comparing the first character of each string.
|
sl@0
|
53 |
If they are equal to each other continues with the following pair
|
sl@0
|
54 |
until the characters differ or until end of string is reached.
|
sl@0
|
55 |
@return a value indicating the lexicographical relation between the strings
|
sl@0
|
56 |
@param a Null-terminated string to compare.
|
sl@0
|
57 |
@param b Null-terminated string to compare.
|
sl@0
|
58 |
*/
|
sl@0
|
59 |
EXPORT_C int
|
sl@0
|
60 |
strcoll (const char *a, const char *b)
|
sl@0
|
61 |
{
|
sl@0
|
62 |
/* Since we don't yet support locales, this is easy! */
|
sl@0
|
63 |
return strcmp (a, b);
|
sl@0
|
64 |
}
|