提交 376921a2 编写于 作者: C Catouse

+ added function 'isNum' in the string.js.

上级 7b02a8fa
......@@ -35,3 +35,22 @@ String.prototype.format = function(args)
}
return result;
};
/**
* Judge the string is a integer number
*
* @access public
* @return bool
*/
String.prototype.isNum = function(s)
{
if(s!=null)
{
var r, re;
re = /\d*/i;
r = s.match(re);
return (r == s) ? true : false;
}
return false;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册