]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
sometimes unused parameter warnings are really worth paying attention to
[wxWidgets.git] / src / common / string.cpp
index 362d682fb2eef1bba8264c871cf7a1b5b57c1d8c..2530f0718f5074fbc87259823968ec7dd86de972 100644 (file)
@@ -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<T>
+// ----------------------------------------------------------------------------
+
+template<>
+wxCharTypeBuffer<char>::Data
+wxCharTypeBuffer<char>::NullData(NULL);
+
+template<>
+wxCharTypeBuffer<wchar_t>::Data
+wxCharTypeBuffer<wchar_t>::NullData(NULL);