]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/base64.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / base64.h
index 7d5c72637e56c0aa94a2e6d6f245b2263aeba74e..1632e60e7effe83a1be51b0e309cc802865a351b 100644 (file)
@@ -89,6 +89,17 @@ wxBase64Decode(void *dst, size_t dstLen,
                wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
                size_t *posErr = NULL);
 
+inline size_t
+wxBase64Decode(void *dst, size_t dstLen,
+               const wxString& src,
+               wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
+               size_t *posErr = NULL)
+{
+    // don't use str.length() here as the ASCII buffer is shorter than it for
+    // strings with embedded NULs
+    return wxBase64Decode(dst, dstLen, src.ToAscii(), wxNO_LEN, mode, posErr);
+}
+
 // decode the contents of the given string; the returned buffer is empty if an
 // error occurs during decoding
 WXDLLIMPEXP_BASE wxMemoryBuffer