hcl/lib/cmn/str-cmp.h

13 lines
168 B
C
Raw Normal View History

2014-07-02 14:29:01 +00:00
int XFUN(strcmp) (const xchar_t* s1, const xchar_t* s2)
{
while (*s1 == *s2)
{
if (*s1 == XCHAR('\0')) return 0;
s1++, s2++;
}
return (*s1 > *s2)? 1: -1;
}