标签:
Validate if a given string is numeric.
"0" => true
"0"
true
" 0.1 " => true
" 0.1 "
"abc" => false
"abc"
false
"1 a" => false
"1 a"
"2e10" => true
"2e10"
LeetCode上的原题,请参见我之前的博客Valid Number。
[LintCode] Valid Number 验证数字
原文地址:http://www.cnblogs.com/grandyang/p/5747730.html