Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE int32_t U_EXPORT2 u_strcmp ( const UChar *  s1,
const UChar *  s2 
)

Compare two Unicode strings for bitwise equality (code unit order).

Parameters:
s1 A string to compare.
s2 A string to compare.
Returns:
0 if s1 and s2 are bitwise equal; a negative value if s1 is bitwise less than s2,; a positive value if s1 is bitwise greater than s2. ICU 2.0

Definition at line 667 of file ustring.c.

{
    UChar  c1, c2;

    for(;;) {
        c1=*s1++;
        c2=*s2++;
        if (c1 != c2 || c1 == 0) {
            break;
        }
    }
    return (int32_t)c1 - (int32_t)c2;
}


Generated by  Doxygen 1.6.0   Back to index