reapired the mistake ,which is the regular expression can inut a nill string

This commit is contained in:
evanljp 2018-05-11 12:08:48 +08:00
parent cf21279738
commit 63c24c4c7e

View File

@ -1017,6 +1017,7 @@ public boolean match(char[] str, char[] pattern) {
```java
public boolean isNumeric(char[] str) {
if(str.length==0||str==null) return false;
return new String(str).matches("[+-]?\\d*(\\.\\d+)?([eE][+-]?\\d+)?");
}
```