double wxTextInputStream::ReadDouble() { if(!m_input) return 0; wxString word = ReadWord(); if(word.empty()) return 0; return wxStrtod(word.c_str(), 0); }
bool ecUtils::StrToDouble (const wxString & strValue, double &dValue) { wxChar* pEnd; errno = 0; //dValue = _tcstod (strValue, &pEnd); dValue = wxStrtod(strValue, &pEnd); return (0 == errno) && (*pEnd == wxT('\0')); }
double wxStrtod_l(const char* str, char **endptr, const wxXLocale& loc) { wxCHECK( loc.IsOk(), 0. ); CNumericLocaleSetter locSetter; return wxStrtod(str, endptr); }
bool CSG_String::asDouble(double &Value) const { const wxChar *start = m_pString->c_str(); wxChar *end; Value = wxStrtod(start, &end); return( end > start ); }
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) { wxChar *s = NULL; bool succ = wxGetResource(section, entry, (wxChar **)&s, file); if (succ) { *value = (float)wxStrtod(s, NULL); delete[] s; return true; } else return false; }
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) { bool ok = true; wxChar *value_ptr; *number = wxStrtod (s, &value_ptr); if (value_ptr) { int len = wxStrlen (value_ptr); for (int i = 0; i < len; i++) { ok = (wxIsspace (value_ptr[i]) != 0); if (!ok) return false; } } return ok; }
void MyFrame::OnSetGravity(wxCommandEvent& WXUNUSED(event) ) { wxString str; str.Printf( wxT("%g"), m_splitter->GetSashGravity()); #if wxUSE_TEXTDLG str = wxGetTextFromUser(wxT("Enter sash gravity (0,1):"), wxT(""), str, this); #endif if ( str.empty() ) return; double gravity = wxStrtod( str, (wxChar**)NULL); m_splitter->SetSashGravity(gravity); #if wxUSE_STATUSBAR str.Printf( wxT("Gravity = %g"), gravity); SetStatusText(str, 1); #endif // wxUSE_STATUSBAR }
void StringToDouble (const wxChar *s, double *number) { if (s && *s && number) *number = wxStrtod (s, (wxChar **) NULL); }
void StringToFloat (const wxChar *s, float *number) { if (s && *s && number) *number = (float) wxStrtod (s, (wxChar **) NULL); }
double wxStrtod_l(const char* str, char **endptr, const wxXLocale& loc) { IMPLEMENT_STRTOX_L_START double ret = wxStrtod(str, endptr); IMPLEMENT_STRTOX_L_END }