]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/base64.h
removing outdated files on mac
[wxWidgets.git] / include / wx / base64.h
index 709fb1dd1e22c40fe4089ebc26b17918be78b0fe..7d5c72637e56c0aa94a2e6d6f245b2263aeba74e 100644 (file)
@@ -96,6 +96,16 @@ wxBase64Decode(const char *src, size_t srcLen = wxNO_LEN,
                wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
                size_t *posErr = NULL);
 
                wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
                size_t *posErr = NULL);
 
+inline wxMemoryBuffer
+wxBase64Decode(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(src.ToAscii(), wxNO_LEN, mode, posErr);
+}
+
 #endif // wxUSE_BASE64
 
 #endif // _WX_BASE64_H_
 #endif // wxUSE_BASE64
 
 #endif // _WX_BASE64_H_