if (str.empty())
return false;
- // Remove leading and trailing white space chars.
- docstring const tmpstr = trim(str);
- if (tmpstr.empty())
- return false;
-
- docstring::const_iterator cit = tmpstr.begin();
- docstring::const_iterator end = tmpstr.end();
- for (; cit != end; ++cit)
+ docstring::const_iterator cit = str.begin();
+ docstring::const_iterator const end = str.end();
+ for (; cit != end; ++cit) {
+ if (*cit == ' ')
+ continue;
if (isdigit((*cit)))
return true;
-
+ }
return false;
}