auto commit

This commit is contained in:
CyC2018
2021-03-23 02:48:19 +08:00
parent 6027156d73
commit 156f7a67f4
15 changed files with 98 additions and 70 deletions

View File

@ -1,6 +1,6 @@
# 20. 表示数值的字符串
[NowCoder](https://www.nowcoder.com/practice/6f8c901d091949a5837e24bb82a731f2?tpId=13&tqId=11206&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
[牛客网](https://www.nowcoder.com/practice/e69148f8528c4039ad89bb2546fd4ff8?tpId=13&tqId=11206&tab=answerKey&from=cyc_github)
## 题目描述
@ -41,8 +41,8 @@ false
```
```java
public boolean isNumeric(char[] str) {
if (str == null || str.length == 0)
public boolean isNumeric (String str) {
if (str == null || str.length() == 0)
return false;
return new String(str).matches("[+-]?\\d*(\\.\\d+)?([eE][+-]?\\d+)?");
}