X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8ebb70d6c40f5ba8db6c24a6537cc65ac48ccd6..3399af21d10d3f8ce4f39dfb29df5546ab265ef6:/interface/wx/strconv.h diff --git a/interface/wx/strconv.h b/interface/wx/strconv.h index 174133388e..c5384a8e43 100644 --- a/interface/wx/strconv.h +++ b/interface/wx/strconv.h @@ -3,7 +3,7 @@ // Purpose: interface of wxMBConvUTF7 // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -177,6 +177,23 @@ public: size_t inLen, size_t *outLen) const; + /** + Converts a char buffer to wide char one. + + This is the most convenient and safest conversion function as you + don't have to deal with the buffer lengths directly. Use it if the + input buffer is known not to be empty or if you are sure that the + conversion is going to succeed -- otherwise, use the overload above to + be able to distinguish between empty input and conversion failure. + + @return + The buffer containing the converted text, empty if the input was + empty or if the conversion failed. + + @since 2.9.1 + */ + const wxWCharBuffer cMB2WC(const wxCharBuffer& buf) const; + //@{ /** Converts from multibyte encoding to the current wxChar type (which @@ -204,6 +221,23 @@ public: size_t inLen, size_t *outLen) const; + /** + Converts a wide char buffer to char one. + + This is the most convenient and safest conversion function as you + don't have to deal with the buffer lengths directly. Use it if the + input buffer is known not to be empty or if you are sure that the + conversion is going to succeed -- otherwise, use the overload above to + be able to distinguish between empty input and conversion failure. + + @return + The buffer containing the converted text, empty if the input was + empty or if the conversion failed. + + @since 2.9.1 + */ + const wxCharBuffer cWC2MB(const wxWCharBuffer& buf) const; + //@{ /** Converts from Unicode to the current wxChar type. @@ -243,7 +277,7 @@ public: /** @deprecated This function is deprecated, please use ToWChar() instead. - Converts from a string @a in in multibyte encoding to Unicode putting up to + Converts from a string @a in multibyte encoding to Unicode putting up to @a outLen characters into the buffer @e out. If @a out is @NULL, only the length of the string which would result