X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a6270322b0767fd7f9956f90538ca55d341fab5..fd1ce7f0bb251c672776e95b3c88c991997922a3:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 362d682fb2..2530f0718f 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -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 // ---------------------------------------------------------------------------- @@ -2002,3 +2009,15 @@ wxUTF8StringBufferLength::~wxUTF8StringBufferLength() wbuf.SetLength(wlen); } #endif // wxUSE_UNICODE_WCHAR + +// ---------------------------------------------------------------------------- +// wxCharBufferType +// ---------------------------------------------------------------------------- + +template<> +wxCharTypeBuffer::Data +wxCharTypeBuffer::NullData(NULL); + +template<> +wxCharTypeBuffer::Data +wxCharTypeBuffer::NullData(NULL);