[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
strnicmp()               Compare n Characters of Strings, Case Insensitive

 #include   <string.h>                   Required for declarations only

 int           strnicmp(str1,str2,n);
 char          *str1;
 char          *str2;
 unsigned int  n;                        Number of characters compared

    strnicmp() is a case-insensitive version of strncmp(); it compares a
    maximum of 'n' characters of 'string1' to 'string2'.  The strings are
    compared lexicographically, without regard to case. (Uppercase and
    lowercase forms of a letter are considered equivalent.)

    Returns:    A value indicating the relationship between the two
                strings:

                      Comparison          Returned

                'string1' <  'string2'      < 0.
                'string1' == 'string2'        0
                'string1' >  'string2'      > 0.

      Notes:    strnicmp() expects to operate on null-terminated strings.
                No overflow checking is done when strings are copied or
                appended.

See Also: strncmp() strcmp()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson