X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aeef0d188cf0356c9c970788af0b7c462e78a694..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/interface/wx/unichar.h diff --git a/interface/wx/unichar.h b/interface/wx/unichar.h index 41994dfde3..e37338f9d0 100644 --- a/interface/wx/unichar.h +++ b/interface/wx/unichar.h @@ -3,7 +3,7 @@ // Purpose: interface of wxUniChar // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -58,6 +58,30 @@ public: */ bool IsAscii() const; + /** + Returns true if the character is representable as a single byte in the + current locale encoding. + + This function only returns true if the character can be converted in + exactly one byte, e.g. it only returns true for 7 bit ASCII characters + when the encoding used is UTF-8. + + It is mostly useful to test if the character can be passed to functions + taking a char and is used by wxWidgets itself for this purpose. + + @param c + An output pointer to the value of this Unicode character as a @c + char. Must be non-@NULL. + @return + @true if the object is an 8 bit char and @a c was filled with its + value as char or @false otherwise (@a c won't be modified then). + + @see IsAscii() + + @since 2.9.1 + */ + bool GetAsChar(char *c) const; + //@{ /** Conversions to char and wchar_t types: all of those are needed to be