add wxString::Capitalize() and MakeCapitalized() for consistency with Upper/Lower() we already have

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-01 23:39:11 +00:00
parent 4b7d829b21
commit 0c7db140c5
5 changed files with 87 additions and 34 deletions

View File

@@ -1704,12 +1704,17 @@ public:
// convert to upper case in place, return the string itself
wxString& MakeUpper();
// convert to upper case, return the copy of the string
// Here's something to remember: BC++ doesn't like returns in inlines.
wxString Upper() const ;
wxString Upper() const { return wxString(*this).MakeUpper(); }
// convert to lower case in place, return the string itself
wxString& MakeLower();
// convert to lower case, return the copy of the string
wxString Lower() const ;
wxString Lower() const { return wxString(*this).MakeLower(); }
// convert the first character to the upper case and the rest to the
// lower one, return the modified string itself
wxString& MakeCapitalized();
// convert the first character to the upper case and the rest to the
// lower one, return the copy of the string
wxString Capitalize() const { return wxString(*this).MakeCapitalized(); }
// trimming/padding whitespace (either side) and truncating
// remove spaces from left or from right (default) side