diff options
Diffstat (limited to 'src/CharClassify.h')
-rw-r--r-- | src/CharClassify.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/CharClassify.h b/src/CharClassify.h index 881d3a114..d746fe02d 100644 --- a/src/CharClassify.h +++ b/src/CharClassify.h @@ -2,7 +2,7 @@ /** @file CharClassify.h ** Character classifications used by Document and RESearch. **/ -// Copyright 2006 by Neil Hodgson <neilh@scintilla.org> +// Copyright 2006-2009 by Neil Hodgson <neilh@scintilla.org> // The License.txt file describes the conditions under which this software may be distributed. #ifndef CHARCLASSIFY_H @@ -22,4 +22,16 @@ private: enum { maxChar=256 }; unsigned char charClass[maxChar]; // not type cc to save space }; + +// These functions are implemented because each platform calls them something different. +int CompareCaseInsensitive(const char *a, const char *b); +int CompareNCaseInsensitive(const char *a, const char *b, size_t len); + +inline char MakeUpperCase(char ch) { + if (ch < 'a' || ch > 'z') + return ch; + else + return static_cast<char>(ch - 'a' + 'A'); +} + #endif |