NWstrncoll

Returns the locale-sensitive comparison of two strings

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Internationalization

Syntax

  #include <time.h> or #define NWL_EXCLUDE_TIME 
  #include <stdio.h> or #define NWL_EXCLUDE_FILE 
  #include <nwlocale.h> 
   
  nint N_API NWstrncoll ( 
     const nstr N_FAR  *string1,  
     const nstr N_FAR  *string2,  
     size_t             maxChars); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWstrncoll 
    (string1  : pnstr; 
     string2  : pnstr; 
     maxChars : size_t 
  ) : nint; 
  
  

Parameters

string1
(IN) Points to the first string to compare.
string2
(IN) Points to the second string to compare.
maxChars
(IN) Specifies the maximum number of characters to compare.

Return Values

0x0000

Two strings are identical or the maxChars parameter is zero

<0

The string1 parameter is less than the string2 parameter, relative to the current locale setting

>0

The string1 parameter is greater than the string2 parameter, relative to the current locale setting

Remarks

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

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.

See Also

NWLsetlocale, NWLstrcoll, NWLstrxfrm