X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/105993f7b6baf97b596d09e9c59c42adcee0dbcf..74d3098357674e6332bb34cf046e2c21d0c42df1:/include/wx/string.h diff --git a/include/wx/string.h b/include/wx/string.h index 369d30c505..1ab7bd3446 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1800,7 +1800,8 @@ public: // version for NUL-terminated data: static wxString From8BitData(const char *data) { return wxString(data); } - const char *To8BitData() const { return c_str(); } + const wxScopedCharBuffer To8BitData() const + { return wxScopedCharBuffer::CreateNonOwned(wx_str(), length()); } #endif // Unicode/ANSI // conversions with (possible) format conversions: have to return a @@ -2288,6 +2289,13 @@ public: // convert to a double bool ToCDouble(double *val) const; + // create a string representing the given floating point number + // in the current locale + static wxString FromDouble(double val) + { return wxString::Format(wxS("%g"), val); } + // in C locale + static wxString FromCDouble(double val); + #ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN // formatted input/output // as sprintf(), returns the number of characters written or < 0 on error