1 // Scintilla source code edit control
2 /** @file CharClassify.h
3 ** Character classifications used by Document and RESearch.
5 // Copyright 2006-2009 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
17 enum cc
{ ccSpace
, ccNewLine
, ccWord
, ccPunctuation
};
18 void SetDefaultCharClasses(bool includeWordClass
);
19 void SetCharClasses(const unsigned char *chars
, cc newCharClass
);
20 int GetCharsOfClass(cc characterClass
, unsigned char *buffer
) const;
21 cc
GetClass(unsigned char ch
) const { return static_cast<cc
>(charClass
[ch
]);}
22 bool IsWord(unsigned char ch
) const { return static_cast<cc
>(charClass
[ch
]) == ccWord
;}
26 unsigned char charClass
[maxChar
]; // not type cc to save space