Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
void translateInt10ToHex(QString& str)
{
static const QRegExp rX("(\\&\\#[0-9]{2,3})");
int pos = 0;
while ((pos = rX.indexIn(str, pos)) > -1)
{
QString xB = rX.cap(1);
str.replace(pos++, xB.size(), QLatin1String("&#x") + QByteArray(1, xB.right(xB.size() - 2).toUShort()).toHex().toUpper());
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question