⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 charclassify.cxx

📁 robocup rcssserver 运行防真机器人足球比赛所用的服务器端
💻 CXX
字号:
// Scintilla source code edit control/** @file CharClassify.cxx ** Character classifications used by Document and RESearch. **/// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>// The License.txt file describes the conditions under which this software may be distributed.#include <ctype.h>#include "CharClassify.h"// Shut up annoying Visual C++ warnings:#ifdef _MSC_VER#pragma warning(disable: 4514)#endifCharClassify::CharClassify() {	SetDefaultCharClasses(true);}void CharClassify::SetDefaultCharClasses(bool includeWordClass) {	// Initialize all char classes to default values	for (int ch = 0; ch < 256; ch++) {		if (ch == '\r' || ch == '\n')			charClass[ch] = ccNewLine;		else if (ch < 0x20 || ch == ' ')			charClass[ch] = ccSpace;		else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_'))			charClass[ch] = ccWord;		else			charClass[ch] = ccPunctuation;	}}void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) {	// Apply the newCharClass to the specifed chars	if (chars) {		while (*chars) {			charClass[*chars] = static_cast<unsigned char>(newCharClass);			chars++;		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -