使用StringUtils.isNumeric(String str) 判断string是否为数字
StringUtils.isNumeric(null) = false
StringUtils.isNumeric("") = true
StringUtils.isNumeric(" ") = false
StringUtils.isNumeric("123") = true
StringUtils.isNumeric("12 3") = false
StringUtils.isNumeric("ab2c") = false
StringUtils.isNumeric("12-3") = false
StringUtils.isNumeric("12.3") = false
转载请注明出处
https://www.cnblogs.com/xinruyi
喜欢可以点击关注我

浙公网安备 33010602011771号