判断string是否为数字
生活随笔
收集整理的這篇文章主要介紹了
判断string是否为数字
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>> ??
?public static boolean isNumeric1(String str){?
?? str=str.trim().replaceAll(" ", "");
? Pattern pattern = Pattern.compile("[0-9]*");
??return pattern.matcher(str).matches();
?}
轉載于:https://my.oschina.net/arrom/blog/224646
總結
以上是生活随笔為你收集整理的判断string是否为数字的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OPatch cannot find a
- 下一篇: 有时间看下这个,分布式缓存,提高并发的