1
// Scintilla source code edit control
2
/** @file CharacterSet.cxx
3
** Simple case functions for ASCII.
4
** Lexer infrastructure.
6
// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
7
// The License.txt file describes the conditions under which this software may be distributed.
15
#include "CharacterSet.h"
18
using namespace Scintilla;
25
int CompareCaseInsensitive(const char *a, const char *b) {
28
char upperA = MakeUpperCase(*a);
29
char upperB = MakeUpperCase(*b);
31
return upperA - upperB;
36
// Either *a or *b is nul
40
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
41
while (*a && *b && len) {
43
char upperA = MakeUpperCase(*a);
44
char upperB = MakeUpperCase(*b);
46
return upperA - upperB;
55
// Either *a or *b is nul