stringutils.cpp

来自「这是VCF框架的代码」· C++ 代码 · 共 2,672 行 · 第 1/5 页

CPP
2,672
字号
			result = "R";		}		break;		case vkLetterS: {			result = "S";		}		break;		case vkLetterT: {			result = "T";		}		break;		case vkLetterU: {			result = "U";		}		break;		case vkLetterV: {			result = "V";		}		break;		case vkLetterW: {			result = "W";		}		break;		case vkLetterX: {			result = "X";		}		break;		case vkLetterY: {			result = "Y";		}		break;		case vkLetterZ: {			result = "Z";		}		break;		case vkSpaceBar: {			result = "Space";		}		break;		case vkReturn: {			result = "Enter";		}		break;		case vkAlt: {			result = "Alt";		}		break;		case vkShift: {			result = "Shift";		}		break;		case vkCtrl: {			result = "Ctrl";		}		break;		case vkTab: {			result = "Tab";		}		break;		case vkEscape: {			result = "Esc";		}		break;		case vkLeftApostrophe: {			result = "`";		}		break;			//`		case vkTilde: {			result = "~";		}		break;					//~		case vkExclamation: {			result = "!";		}		break;				//!		case vkCommercialAt: {			result = "@";		}		break;				//@		case vkNumberSign: {			result = "#";		}		break;				//#		case vkDollarSign: {			result = "$";		}		break;				//$		case vkPercent: {			result = "%";		}		break;					//%		case vkCircumflex: {			result = "^";		}		break;				//^		case vkAmpersand: {			result = "&";		}		break;				//&		case vkAsterix: {			result = "*";		}		break;					//*		case vkOpenParen: {			result = "(";		}		break;				//(		case vkCloseParen: {			result = ")";		}		break;				//)		case vkHyphen: {			result = "-";		}		break;					//-		case vkUnderbar: {			result = "_";		}		break;					//_		case vkEqualsSign: {			result = "=";		}		break;				//=		case vkPlusSign: {			result = "+";		}		break;					//+		case vkUprightBar: {			result = "|";		}		break;				//|		case vkBackSlash: {			result = "\\";		}		break;				/* \   */		case vkOpenBracket: {			result = "[";		}		break;				//[		case vkOpenBrace: {			result = "{";		}		break;				//{		case vkCloseBracket: {			result = "]";		}		break;				//]		case vkCloseBrace: {			result = "}";		}		break;				//}		case vkSemiColon: {			result = ";";		}		break;		case vkColon: {			result = ":";		}		break;		case vkSingleQuote: {			result = "'";		}		break;		case vkDoubleQuote: {			result = "\"";		}		break;		case vkComma: {			result = ",";		}		break;		case vkLessThan: {			result = "<";		}		break;		case vkPeriod: {			result = ".";		}		break;		case vkGreaterThan: {			result = ">";		}		break;		case vkForwardSlash: {			result = "/";		}		break;		case vkQuestionMark: {			result = "?";		}		break;		//miscellaneous		case vkPrintScreen: {			result = "Print Screen";		}		break;		case vkScrollLock: {			result = "Scroll Lock";		}		break;		case vkPause: {			result = "Pause";		}		break;		case vkCapsLock: {			result = "Caps Lock";		}		break;	}	return result;}/***CVS Log info*$Log$*Revision 1.5  2006/04/07 02:35:35  ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.4.2.16  2006/03/19 00:04:16  obirsoy*Linux FoundationKit improvements.**Revision 1.4.2.15  2006/01/22 17:19:37  ddiego*fixed some bugs in type_info handling for gcc.**Revision 1.4.2.14  2006/01/22 14:24:12  ddiego*updated to add case insens str compare.**Revision 1.4.2.13  2006/01/22 05:50:09  ddiego*added case insensitive string compare to string utils class.**Revision 1.4.2.12  2006/01/20 20:04:26  dougtinkham*demangle typeinfo names for MinGW**Revision 1.4.2.11  2005/12/04 20:58:32  ddiego*more osx impl work. foundationkit is mostly complete now.**Revision 1.4.2.10  2005/12/01 01:33:14  obirsoy*add back the borland fixes.**Revision 1.4.2.9  2005/12/01 01:13:00  obirsoy*More linux improvements.**Revision 1.4.2.7  2005/11/10 04:43:27  ddiego*updated the osx build so that it*compiles again on xcode 1.5. this applies to the foundationkit and graphicskit.**Revision 1.4.2.6  2005/11/10 02:02:38  ddiego*updated the osx build so that it*compiles again on xcode 1.5. this applies to the foundationkit and graphicskit.**Revision 1.4.2.5  2005/11/04 17:56:17  ddiego*fixed bugs in some win32 code to better handle unicode - ansi functionality.**Revision 1.4.2.4  2005/08/01 19:57:01  marcelloptr*minor fixes or additions**Revision 1.4.2.2  2005/07/30 16:52:57  iamfraggle*Provide (temporary) CW implementations of lowerCase and upperCase and made trimLeft use standard variable declaration**Revision 1.4.2.1  2005/07/24 02:30:26  ddiego*fixed bug in retreiving program info.**Revision 1.4  2005/07/09 23:15:05  ddiego*merging in changes from devmain-0-6-7 branch.**Revision 1.3.2.10  2005/06/25 21:49:06  marcelloptr*fixes on trimLeft and fromStringAsHexNumber**Revision 1.3.2.9  2005/04/18 12:41:29  dougtinkham*changes for DMC**Revision 1.3.2.8  2005/04/18 04:26:25  dougtinkham*change for DMC, on swprintf calls**Revision 1.3.2.7  2005/04/17 16:11:32  ddiego*brought the foundation, agg, and graphics kits uptodate on linux**Revision 1.3.2.6  2005/04/13 02:50:45  iamfraggle*Enable Unicode in CodeWarrior**Revision 1.3.2.5  2005/04/11 17:07:12  iamfraggle*Changes allowing compilation of Win32 port under CodeWarrior**Revision 1.3.2.4  2005/03/15 01:51:51  ddiego*added support for Format class to take the place of the*previously used var arg funtions in string utils and system. Also replaced*existing code in the framework that made use of the old style var arg*functions.**Revision 1.3.2.3  2005/03/14 05:44:51  ddiego*added the Formatter class as part of the process of getting rid of the var arg methods in System and StringUtils.**Revision 1.3.2.2  2005/03/14 04:17:24  ddiego*adds a fix plus better handling of accelerator keys, ands auto menu title for the accelerator key data.**Revision 1.3.2.1  2005/02/16 05:09:33  ddiego*bunch o bug fixes and enhancements to the property editor and treelist control.**Revision 1.3  2004/12/01 04:31:41  ddiego*merged over devmain-0-6-6 code. Marcello did a kick ass job*of fixing a nasty bug (1074768VCF application slows down modal dialogs.)*that he found. Many, many thanks for this Marcello.**Revision 1.2.2.7  2004/11/17 04:52:49  ddiego*added some minor fixes to win32 resource loading, and added 2 new examples that demonstrate basic resource loading and basic usage of dialogs.**Revision 1.2.2.6  2004/10/23 12:20:00  marcelloptr*bugfix [1048400] menus are now merged regardless of their shortcut key**Revision 1.2.2.5  2004/09/18 16:37:10  marcelloptr*changed implementation of fromStringAsDouble as it was crashing on vc6. Thanks Jim for pointing it out. Improved fromStringAsULong64**Revision 1.2.2.4  2004/09/17 21:03:02  marcelloptr*fromStringAs... function made 5-10 times faster in debug mode with Win32 MS VC CRT while checking for validity**Revision 1.2.2.2  2004/08/31 08:50:52  marcelloptr*minor fix string <--> signed long64 conversion**Revision 1.2.2.1  2004/08/26 04:05:47  marcelloptr*minor change on name of getMillisecond**Revision 1.2  2004/08/07 02:49:15  ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.19  2004/08/03 20:57:22  marcelloptr*minor change on name DateTime:getSecond DateTime:getMillisecond**Revision 1.1.2.18  2004/08/02 14:27:05  kiklop74*Minor fix in functions lowercase and uppercase that prevented them to*work under Borland C++**Revision 1.1.2.17  2004/07/27 04:26:04  ddiego*updated devmain-0-6-5 branch with osx changes**Revision 1.1.2.16  2004/07/26 03:40:31  ddiego*minor changes**Revision 1.1.2.15  2004/07/26 03:30:39  marcelloptr*minor fix string to double conversion**Revision 1.1.2.14  2004/07/26 00:47:38  marcelloptr*added conversions String <-> long64**Revision 1.1.2.13  2004/07/21 02:06:53  marcelloptr*BugFix 985136 cast to (int) and ulong64 and other conversion issues*The fromStringAs... functions now throw an exception in case of some errors**Revision 1.1.2.12  2004/07/05 01:01:51  marcelloptr*added ulong64 ctor, operators and toString conversion**Revision 1.1.2.11  2004/06/06 07:05:33  marcelloptr*changed macros, text reformatting, copyright sections**Revision 1.1.2.9  2004/05/31 19:42:52  ddiego*more osx updates**Revision 1.1.2.8  2004/05/31 13:20:57  ddiego*more osx updates**Revision 1.1.2.7  2004/05/18 02:07:32  ddiego*fixed a bug in StringUtils format and trace  - from osx side**Revision 1.1.2.6  2004/05/16 02:39:09  ddiego*OSX code updates**Revision 1.1.2.5  2004/05/03 03:44:53  ddiego*This checks in a bunch of changes to the FoundationKit for OSX*porting. The thread, mutex, semaphor, condition, and file peers*have all been implemented and tested. The file peer could be improved*and needs search functionality. The locale peer is only partially*complete, but the functions will return values. The unicode transition*is also finished and works OK now.**Revision 1.1.2.4  2004/04/30 05:44:34  ddiego*added OSX changes for unicode migration**Revision 1.1.2.3  2004/04/29 04:07:13  marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.2  2004/04/28 18:42:26  ddiego*migrating over changes for unicode strings.*This contains fixes for the linux port and changes to the Makefiles**Revision 1.1.2.1  2004/04/28 03:29:40  ddiego*migration towards new directory structure**Revision 1.19.2.1  2004/04/21 02:17:27  ddiego*checking in change to FoundationKit, GraphicsKit and Application*Kit to support unicode in Win32**Revision 1.19  2004/04/03 15:48:49  ddiego*Merged over code from the 0-6-3 branch.**Revision 1.17.2.5  2004/03/29 15:22:00  ddiego*some minor fixes**Revision 1.17.2.4  2004/03/21 00:39:24  ddiego*merged vc7.1 changes into dev branch**Revision 1.17.2.3  2004/02/21 03:27:10  ddiego*updates for OSX porting**Revision 1.17.2.2  2004/01/17 18:47:31  ddiego*added a new example for DateTime calss and some other minor fixes to it**Revision 1.17.2.1  2004/01/17 06:09:50  ddiego*integrated the DateTime class into the VCF FoundationKit.**Revision 1.17  2003/12/18 05:16:02  ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.16.4.3  2003/11/10 01:57:43  ddiego*add a fromString methods to StingUtils*added some minor fixes to list box control and added a SelectionChanged*Delegate to it*add some minor fixes ot ComboBoxControl*added an unknownColor() method to ColorNames class**Revision 1.16.4.2  2003/08/20 22:55:20  ddiego*got rid of some older methods for StringUtils, should be using the FilePath*class instead**Revision 1.16.4.1  2003/08/11 19:58:54  marcelloptr*improvement: StringUtils::trimWhiteSpaces functions added**Revision 1.16  2003/05/17 20:37:42  ddiego*this is the checkin for the 0.6.1 release - represents the merge over from*the devmain-0-6-0 branch plus a few minor bug fixes**Revision 1.15.2.2  2003/03/23 04:06:34  marcelloptr*minor fixes**Revision 1.15.2.1  2003/03/23 03:23:59  marcelloptr*3 empty lines at the end of the files**Revision 1.15  2003/02/26 04:30:53  ddiego*merge of code in the devmain-0-5-9 branch into the current tree.*most additions are in the area of the current linux port, but the major*addition to this release is the addition of a Condition class (currently*still under development) and the change over to using the Delegate class*exclusively from the older event handler macros.**Revision 1.14.12.2  2003/01/08 03:49:21  ddiego*fixes to ensure that move and size events get sent properly. Not sure*I am happy with how it is currently working. Fix to X11Cursor so that the cursorID*has a valid initial value.**Revision 1.14.12.1  2002/12/28 21:51:20  marcelloptr*Fixes and improvements for WM_COPYDATA, Point, Rect, Size, GraphicsContext and StringUtils**Revision 1.14  2002/05/26 21:19:54  ddiego*added and fixed xmake makefiles for FoundationKit and for the RTTI test*so that this now runs under linux (should work fine for Solaris as well).*Made some changes to Object for removing one of the operator delete() when*using GCC*Other minor changes to files to ensure that they end with a carriage return**Revision 1.13  2002/05/09 03:10:45  ddiego*merged over code from development branch devmain-0-5-1a into the main CVS trunk**Revision 1.12.4.2  2002/03/25 04:19:46  ddiego*fixed some file checking problems in xmake and fixed some general*code to be able to compile with GCC and Borland C++**Revision 1.12.4.1  2002/03/20 21:56:57  zzack*Changed Include Style of FoundationKit**Revision 1.12  2002/01/24 01:46:49  ddiego*added a cvs "log" comment to the top of all files in vcf/src and vcf/include*to facilitate change tracking**/

⌨️ 快捷键说明

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