Update of /cvsroot/pclasses/pclasses2/include/pclasses/Util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13733/include/pclasses/Util
Modified Files:
StringTool.h
Log Message:
Made upperCase(), lowerCase() honor the global locale
Added upperCase(), lowerCase() taking a locale
Added faster versions of trimString() (trimLeft(), trimRight(), trim())
Index: StringTool.h
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Util/StringTool.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- StringTool.h 10 Jan 2005 02:36:16 -0000 1.6
+++ StringTool.h 10 Jan 2005 12:58:05 -0000 1.7
@@ -353,12 +353,33 @@
size_t expandDollarRefsInline( std::string & buffer, const EntityMap & src );
-//! Returns a copy of the string converted to uppercase letters
+//! Strip leading white-speaces
+void trimLeft(std::string& str);
+
+//! Strip trailing white-spaces
+void trimRight(std::string& str);
+
+//! Strip leading and trailing white-spaces
+void trim(std::string& str);
+
+//! Returns the string converted to uppercase letters
std::string upperCase(const std::string& str);
-//! Returns a copy of the string converted to lowercase letters
+//! Returns the string converted to uppercase letters
+/*!
+ Uses the given locale to do the conversion.
+*/
+std::string upperCase(const std::string& str, const std::locale& loc);
+
+//! Returns the string converted to lowercase letters
std::string lowerCase(const std::string& str);
+//! Returns the string converted to lowercase letters
+/*!
+ Uses the given locale to do the conversion.
+*/
+std::string lowerCase(const std::string& str, const std::locale& loc);
+
}} // namespace P::StringTool
|