]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.cpp
fix warning on possibly(?) unused precompiled headers due to different -fPic settings...
[lyx.git] / src / support / lstrings.cpp
index cb0d82b7b03411d9465264606b0a2c305307459b..8568b2f7e059294ee1a002335edf32b38b0c8e45 100644 (file)
@@ -254,6 +254,16 @@ bool isAscii(docstring const & str)
 }
 
 
+bool isAscii(string const & str)
+{
+       int const len = str.length();
+       for (int i = 0; i < len; ++i)
+               if (static_cast<unsigned char>(str[i]) >= 0x80)
+                       return false;
+       return true;
+}
+
+
 char lowercase(char c)
 {
        BOOST_ASSERT(static_cast<unsigned char>(c) < 0x80);