strnicmp

Compares, with case insensitivity, a specified number of characters in one string to another string.

Library:LibC
Classification:Other
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  int strnicmp (
     const char   *s1,
     const char   *s2,
     size_t        len);
  

Parameters

s1

(IN) Points to a string to compare.

s2

(IN) Points to a string to compare.

len

(IN) Specifies the number of characters to compare.

Return Values

Returns 0 if the two strings match. Otherwise, returns an integer less than or greater than 0, depending on whether s1 is lexicographically less than or greater than s2.

Remarks

The strnicmp function compares, with case insensitivity, the string pointed to by s1 to the string pointed to by s2, for at most len characters.

See Also