]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stringops.h
added support for binary data to wxConfig (slightly modified patch 1736788)
[wxWidgets.git] / include / wx / stringops.h
index ed53532d9e0392665af8410c6e7026f317502ba6..b8ba8abd749c21430986cedad4f7dc272877528e 100644 (file)
@@ -40,8 +40,6 @@ struct WXDLLIMPEXP_BASE wxStringOperationsWchar
         { return i + n; }
     static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
         { return i + n; }
-    static const wxChar* AddToIter(const wxChar *i, int n)
-        { return i + n; }
 
     // returns distance of the two iterators in Unicode characters
     static int DiffIters(const wxStringImpl::iterator& i1,
@@ -142,15 +140,10 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8
         return dist;
     }
 
-    // buffer for single UTF-8 character
-    struct Utf8CharBuffer
-    {
-        char data[5];
-        operator const char*() const { return data; }
-    };
-
     // encodes the character as UTF-8:
-    static Utf8CharBuffer EncodeChar(const wxUniChar& ch);
+    typedef wxUniChar::Utf8CharBuffer Utf8CharBuffer;
+    static Utf8CharBuffer EncodeChar(const wxUniChar& ch)
+        { return ch.AsUTF8(); }
 
     // returns n copies of ch encoded in UTF-8 string
     static wxCharBuffer EncodeNChars(size_t n, const wxUniChar& ch);