Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1882 clevermous 1
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
#include 
3
#include 
4
 
5
int
6
strnicmp(const char *s1, const char *s2, size_t n)
7
{
8
 
9
  if (n == 0)
10
    return 0;
11
  do {
12
    if (tolower(*s1) != tolower(*s2++))
13
      return (int)tolower(*s1) - (int)tolower(*--s2);
14
    if (*s1++ == 0)
15
      break;
16
  } while (--n != 0);
17
  return 0;
18
}