NWstrncoll(3nw)


NWstrncoll -- returns locale-sensitve comparison of two strings

Synopsis

   #include <time.h> or #define NWL_EXCLUDE_TIME 
   #include <stdio.h> or #define NWL_EXCLUDE_FILE 
   #include <nwlocale.h> 
   

int NWAPI NWstrncoll (char NWFAR *string1, char NWFAR *string2, size_t maxChars);

Description

The parameters are as follows:

string1
(IN) Points to the first string to compare.

string2
(IN) Points to the second string to compare.

maxChars
(IN) Specifies the number of bytes to compare.

Return values

0x0000
Two strings are identical or maxChars is zero.

<0
string1 < string2, relative to current locale setting.

>0
string1 > string2, relative to current locale setting.

Notices

If no collate table exists, the locale is C locale (strcmp).

NWstrncoll is useful to insert or delete items in a sorted list based on their collation value.

Double byte characters count as one character in the count.

Services

Internationalization

NCP calls

None

References

NWLsetlocale(3nw), NWLstrcoll(3nw), NWLstrxfrm(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.