#include <QFile>
-#include <locale>
-#include <iostream>
-#include <typeinfo>
-
using namespace std;
+using lyx::support::isHexChar;
namespace lyx {
if (s.empty())
return string();
QByteArray const local = toqstr(s).toLocal8Bit();
- if (local.size() == 0)
+ if (local.isEmpty())
throw to_local8bit_failure();
return string(local.begin(), local.end());
}
bool isNumpunct(lyx::char_type const c) const
{
/// Only account for the standard numpunct "C" locale facet.
- return c < 0x80 && (c == '-' || c == '+' || isdigit(c)
- || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')
- || c == 'x' || c == 'X');
+ return c == '-' || c == '+'
+ || c == 'x' || c == 'X'
+ || isHexChar(c);
}
template <typename ValueType>