64,682
社区成员
发帖
与我相关
我的任务
分享
std::string strData = "sdsdasd1a111";
strData.erase(std::remove_if(strData.begin(), strData.end(), isdigit), strData.end());
bool str_isxdigit(const char *src) // 检测字符串是否是数字
{
while(*src ) {
if (!isxdigit(*src++))
return false;
}
return true ;
}