NO1.求一个字符串是否是纯数字。
--[[
NO1
@biref: 判断输入字符串是否为纯数字
@parames: str需要检测的字符串
@return: true 纯数字
]]--
function checkNumber(str)
local ret = true;
local ret1,ret2 = string.find(str,"%a");
if ret1 ~= nil then
ret = false;
end
local ret1,ret2 = string.find(str,"%p");
if ret1 ~= nil then
ret = false;
end
return ret;
end