www.delorie.com/djgpp/doc/libc/libc_770.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

strnicmp

Syntax

 
#include <string.h>

int strnicmp(const char *s1, const char *s2, size_t max);

Description

This function compares s1 and s2, ignoring case, up to a maximum of max characters.

Return Value

Zero if the strings are equal, a positive number if s1 comes after s2 in the ASCII collating sequense, else a negative number.

Portability

ANSI/ISO C No
POSIX No

Example

 
if (strnicmp(foo, "-i", 2) == 0)
  do_include();

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004