From 873e028ffa252fc1d27b9123bf9834614b8e9a55 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 25 Aug 2020 16:49:05 +0200 Subject: [PATCH] Document wxASCII_STR() macro Also improve wxString::FromAscii() documentation slightly. --- interface/wx/string.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interface/wx/string.h b/interface/wx/string.h index a486533992..6adee24bab 100644 --- a/interface/wx/string.h +++ b/interface/wx/string.h @@ -1776,6 +1776,12 @@ public: /** Converts the string or character from an ASCII, 7-bit form to the native wxString representation. + + Input must consist only of 7-bit (i.e. less than 128) ASCII characters, + the behaviour in presence of non-ASCII characters is undefined but will + result in assert failures. + + @see wxASCII_STR() */ static wxString FromAscii(const char* s); static wxString FromAscii(const unsigned char* s); @@ -2069,4 +2075,14 @@ public: template inline bool wxStringCheck(const wxString& val); +/** + Convenience macro for explicitly constructing wxString from ASCII strings. + + This macro simply expands to a call to wxString::FromAscii() but is + slightly shorter. + + @since 3.1.4 + */ +wxString wxASCII_STR(const char* s); + //@}