+ wxCHECK_MSG( precision >= -1, wxString(), "Invalid negative precision" );
+
+ wxString format;
+ if ( precision == -1 )
+ {
+ format = "%g";
+ }
+ else // Use fixed precision.
+ {
+ format.Printf("%%.%df", precision);
+ }
+
+ return wxString::Format(format, val);
+}
+
+/* static */
+wxString wxString::FromCDouble(double val, int precision)
+{
+ wxCHECK_MSG( precision >= -1, wxString(), "Invalid negative precision" );
+