QString text = "fsdfsdf";
QByteArray ba = text.toLatin1();//QString 转换为 char*
const char* s = ba.data();
while (*s && *s >= '0' && *s <= '9') s++;
if (*s)
{
//不是数字
}
else
{
//数字
}
QString为数字判断
最新推荐文章于 2024-05-29 15:51:55 发布