::IsNumber() returned FALSE if a + or - sign was the first character of the string. "-123" should be considered a number

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2000-02-23 23:11:53 +00:00
parent 6be0044cf2
commit 2f74ed2859
3 changed files with 165 additions and 35 deletions

View File

@@ -910,6 +910,8 @@ bool wxString::IsWord() const
bool wxString::IsNumber() const
{
const wxChar *s = (const wxChar*) *this;
if (wxStrlen(s))
if ((s[0] == '-') || (s[0] == '+')) s++;
while(*s){
if(!wxIsdigit(*s)) return(FALSE);
s++;