Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
This commit is contained in:
@@ -364,6 +364,17 @@ std::string UIDouble2Str( double aValue );
|
||||
*/
|
||||
std::string FormatDouble2Str( double aValue );
|
||||
|
||||
/**
|
||||
* Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
|
||||
*
|
||||
* wxstring is a wxString, not a wxT() or _(). The scope of the return value
|
||||
* is very limited and volatile, but can be used with printf() style functions well.
|
||||
*
|
||||
* @note Trying to convert it to a function is tricky because of the type of the
|
||||
* parameter!
|
||||
*/
|
||||
#define TO_UTF8( wxstring ) ( (const char*) ( wxstring ).utf8_str() )
|
||||
|
||||
/**
|
||||
* Convert an expected UTF8 encoded std::string to a wxString.
|
||||
* If fails, tray to convert using current locale
|
||||
|
||||
Reference in New Issue
Block a user