utf8cmp

Compares two strings.

Library:LibC
Service:Characters and Strings

Syntax

  #include <utf8.h> 
   
  int utf8cmp (
     const utf8_t   *s1,   
     const utf8_t   *s2);
  

Parameters

s1

(IN) Points to the string to be compared to the string pointed to by s2.

s2

(IN) Points to the string to be compared to the string pointed to by s1.

Return Values

Returns one of the following int values:

< 0

if s1 is less than s2

0

if s1 is equal to s2

>0

if s1 is greater than s2

Remarks

The utf8cmp function works the same as its ANSI/ISO equivalent, strcmp, except that utf8cmp works on strings containing UTF-8 characters, which can be composed of one or two bytes. UTF-8 characters can require up to six bytes total, but NetWare does not generate such characters.

See Also