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为数字判断
最新推荐文章于 2025-04-16 16:13:52 发布