added wxBase64Decode() overload taking wxString, otherwise it's inconvenient to use in wxUSE_STL==1 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2856,6 +2856,11 @@ The clipboard must have previously been opened for this call to succeed.
|
|||||||
\param{wxBase64DecodeMode }{mode = wxBase64DecodeMode\_Strict},\\
|
\param{wxBase64DecodeMode }{mode = wxBase64DecodeMode\_Strict},\\
|
||||||
\param{size\_t }{*posErr = \NULL}}
|
\param{size\_t }{*posErr = \NULL}}
|
||||||
|
|
||||||
|
\func{wxMemoryBuffer}{wxBase64Decode}{\\
|
||||||
|
\param{const wxString\& }{src},\\
|
||||||
|
\param{wxBase64DecodeMode }{mode = wxBase64DecodeMode\_Strict},\\
|
||||||
|
\param{size\_t }{*posErr = \NULL}}
|
||||||
|
|
||||||
These function decode a Base64-encoded string. The first version is a raw
|
These function decode a Base64-encoded string. The first version is a raw
|
||||||
decoding function and decodes the data into the provided buffer \arg{dst} of
|
decoding function and decodes the data into the provided buffer \arg{dst} of
|
||||||
the given size \arg{dstLen}. An error is returned if the buffer is not large
|
the given size \arg{dstLen}. An error is returned if the buffer is not large
|
||||||
@@ -2878,7 +2883,8 @@ necessary buffer size.}
|
|||||||
\docparam{dstLen}{The size of the output buffer, ignored if \arg{dst} is
|
\docparam{dstLen}{The size of the output buffer, ignored if \arg{dst} is
|
||||||
\NULL.}
|
\NULL.}
|
||||||
|
|
||||||
\docparam{src}{The input string, must not be \NULL.}
|
\docparam{src}{The input string, must not be \NULL. For the version using
|
||||||
|
wxString, the input string should contain only ASCII characters.}
|
||||||
|
|
||||||
\docparam{srcLen}{The length of the input string or special value
|
\docparam{srcLen}{The length of the input string or special value
|
||||||
\texttt{wxNO\_LEN} if the string is \NUL-terminated and the length should be
|
\texttt{wxNO\_LEN} if the string is \NUL-terminated and the length should be
|
||||||
|
@@ -96,6 +96,16 @@ wxBase64Decode(const char *src, size_t srcLen = wxNO_LEN,
|
|||||||
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
|
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
|
||||||
size_t *posErr = NULL);
|
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 // wxUSE_BASE64
|
||||||
|
|
||||||
#endif // _WX_BASE64_H_
|
#endif // _WX_BASE64_H_
|
||||||
|
Reference in New Issue
Block a user