uninicmp

Compares a specified number of characters (using the character values, not the collation value) of the lower case versions of two strings

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Unicode

Syntax

   #include <unicode.h> 
    
   N_EXTERN_LIBRARY(nint) uninicmp  ( 
      const unicode N_FAR  *s1,  
      const unicode N_FAR  *s2,  
      size_t                len);
   

Pascal Syntax

   uses netwin32 
    
   Function uninicmp 
     (s1  : const unicode;        
      s2  : const unicode;        
      len : size_t           
   ) : nint;
   

Parameters

s1
(IN) Points to the first string to be compared.
s2
(IN) Points to the second string to be compared.
n
(IN) Specifies the maximum number of characters (not bytes) to be compared.

Return Values

One of the following values:

< 0 if s1 is less than s2

= 0 if s1 is equal to s2

> 0 if s1 is greater than s2

Remarks

uninicmp converts its arguments to lower case according to the standard Monocase Converter rules. It then compares s1 to s2, for a maximum length of n characters, starting with the first character in each string and continuing with subsequent characters until (1) the corresponding characters differ or (2) the end of the strings is reached. The comparison is done lexicographically, using the value of the unicode character not the collation weight.

uninicmp is useful for comparing strings for equality. Do not call uninicmp for sorting strings into collation order.

uninicmp corresponds to the C strnicmp function.

For sample code, see Section 3.20, Example: uninicmp.

See Also

uniicmp