X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4db03d266bba0da0fa2d96c408fb3bb697b96128..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/include/wx/base64.h?ds=sidebyside diff --git a/include/wx/base64.h b/include/wx/base64.h index 709fb1dd1e..7d5c72637e 100644 --- a/include/wx/base64.h +++ b/include/wx/base64.h @@ -96,6 +96,16 @@ wxBase64Decode(const char *src, size_t srcLen = wxNO_LEN, 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_