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:
@@ -1363,6 +1363,20 @@ wxString& wxString::MakeLower()
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxString& wxString::MakeCapitalized()
|
||||
{
|
||||
const iterator en = end();
|
||||
iterator it = begin();
|
||||
if ( it != en )
|
||||
{
|
||||
*it = (wxChar)wxToupper(*it);
|
||||
for ( ++it; it != en; ++it )
|
||||
*it = (wxChar)wxTolower(*it);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// trimming and padding
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -1967,13 +1981,6 @@ int wxString::Freq(wxUniChar ch) const
|
||||
return count;
|
||||
}
|
||||
|
||||
// convert to upper case, return the copy of the string
|
||||
wxString wxString::Upper() const
|
||||
{ wxString s(*this); return s.MakeUpper(); }
|
||||
|
||||
// convert to lower case, return the copy of the string
|
||||
wxString wxString::Lower() const { wxString s(*this); return s.MakeLower(); }
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxUTF8StringBuffer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user