]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.cpp
tiger support on mac snow leopard, include Qt4 frameworks, smart build script with...
[lyx.git] / src / support / lstrings.cpp
index f5f3b1c4760ac6a86b8cb99b7cf4d7f4852aed56..7039fe127f8811b26ee73eedf61901177dcd9437 100644 (file)
@@ -320,17 +320,14 @@ bool hasDigit(docstring const & str)
        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;
 }