os/ossrv/genericopenlibs/cstdlib/LCHAR/STRCOLL.C
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LCHAR/STRCOLL.C	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,64 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +* FUNCTION
    1.19 +* <<strcoll>>---locale specific character string compare
    1.20 +* INDEX
    1.21 +* strcoll
    1.22 +* ANSI_SYNOPSIS
    1.23 +* #include <string.h>
    1.24 +* int strcoll(const char *<[stra]>, const char * <[strb]>);
    1.25 +* TRAD_SYNOPSIS
    1.26 +* #include <string.h>
    1.27 +* int strcoll(<[stra]>, <[strb]>)
    1.28 +* char *<[stra]>;
    1.29 +* char *<[strb]>;
    1.30 +* <<strcoll>> compares the string pointed to by <[stra]> to
    1.31 +* the string pointed to by <[strb]>, using an interpretation
    1.32 +* appropriate to the current <<LC_COLLATE>> state.
    1.33 +* RETURNS
    1.34 +* If the first string is greater than the second string,
    1.35 +* <<strcoll>> returns a number greater than zero.  If the two
    1.36 +* strings are equivalent, <<strcoll>> returns zero.  If the first
    1.37 +* string is less than the second string, <<strcoll>> returns a
    1.38 +* number less than zero.
    1.39 +* PORTABILITY
    1.40 +* <<strcoll>> is ANSI C.
    1.41 +* <<strcoll>> requires no supporting OS subroutines.
    1.42 +* QUICKREF
    1.43 +* strcoll ansi pure
    1.44 +* 
    1.45 +*
    1.46 +*/
    1.47 +
    1.48 +
    1.49 +
    1.50 +#include <string.h>
    1.51 +
    1.52 +/**
    1.53 +Compares a to b character by character according to the character table 
    1.54 +set by current locale.
    1.55 +This function starts comparing the first character of each string. 
    1.56 +If they are equal to each other continues with the following pair
    1.57 +until the characters differ or until end of string is reached.
    1.58 +@return a value indicating the lexicographical relation between the strings
    1.59 +@param a Null-terminated string to compare. 
    1.60 +@param b Null-terminated string to compare.
    1.61 +*/
    1.62 +EXPORT_C int
    1.63 +strcoll (const char *a, const char *b)
    1.64 +{
    1.65 +  /* Since we don't yet support locales, this is easy! */
    1.66 +  return strcmp (a, b);
    1.67 +}