blob: 797b71fb0c502862c1a1dd145097166eb5a9ccf6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
//
// mxToolKit (c) 1999 by Mete Ciragan
//
// file: mxstring.cpp
// implementation: all
// last modified: May 04 1999, Mete Ciragan
// copyright: The programs and associated files contained in this
// distribution were developed by Mete Ciragan. The programs
// are not in the public domain, but they are freely
// distributable without licensing fees. These programs are
// provided without guarantee or warrantee expressed or
// implied.
//
#include "mxtk/mxstring.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int
mx_strncasecmp (const char *s1, const char *s2, int count)
{
#ifdef WIN32
return _strnicmp (s1, s2, count);
#else
return strncasecmp (s1, s2, count);
#endif
}
int
mx_strcasecmp (const char *s1, const char *s2)
{
#ifdef WIN32
return _stricmp (s1, s2);
#else
return strcasecmp (s1, s2);
#endif
}
char *
mx_strlower (char *str)
{
int i;
for (i = (int)strlen (str) - 1; i >= 0; i--)
str[i] = (char)tolower (str[i]);
return str;
}
|