]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.C
Make it possible to uses non-ascii labelstring, endlabelstring and
[lyx.git] / src / support / lstrings.C
index d68b75f3fff10f990817a5d84cd68186ab4bb3c5..939d48531b78e621422d5a2a2ee8bc2fad22d9e9 100644 (file)
@@ -256,7 +256,7 @@ bool isHex(docstring const & str)
 {
        int index = 0;
 
-       if (str.length() > 2 and str[0] == '0' &&
+       if (str.length() > 2 && str[0] == '0' &&
            (str[1] == 'x' || str[1] == 'X'))
                index = 2;
 
@@ -279,6 +279,16 @@ int hexToInt(docstring const & str)
 }
 
 
+bool isAscii(docstring const & str)
+{
+       int const len = str.length();
+       for (int i = 0; i < len; ++i)
+               if (str[i] >= 0x80)
+                       return false;
+       return true;
+}
+
+
 char lowercase(char c)
 {
        return char(tolower(c));