diff --git a/README.md b/README.md
index 09989d4b5..16eaf0437 100755
--- a/README.md
+++ b/README.md
@@ -145,6 +145,7 @@ For previous versions, please read:
## V3 changes
+* v3.0, 2019-12-20, For [#1508][bug #1508], Refactor srs_is_digital, support all zeros.
* v3.0, 2019-12-19, [3.0 alpha5(3.0.75)][r3.0a5] released. 115362 lines.
* v3.0, 2019-12-19, Refine the RTMP iovs cache increasing to much faster.
* v3.0, 2019-12-19, Fix [#1524][bug #1524], memory leak for amf0 strict array. 3.0.75
@@ -1541,6 +1542,7 @@ Winlin
[bug #1506]: https://github.com/ossrs/srs/issues/1506
[bug #1520]: https://github.com/ossrs/srs/issues/1520
[bug #1223]: https://github.com/ossrs/srs/issues/1223
+[bug #1508]: https://github.com/ossrs/srs/issues/1508
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828
diff --git a/trunk/src/app/srs_app_utility.cpp b/trunk/src/app/srs_app_utility.cpp
index 6ea2ba0f8..9c6343860 100644
--- a/trunk/src/app/srs_app_utility.cpp
+++ b/trunk/src/app/srs_app_utility.cpp
@@ -29,7 +29,6 @@
#include
#include
#include
-#include
#include
#ifdef SRS_OSX
@@ -1158,17 +1157,6 @@ string srs_get_peer_ip(int fd)
return std::string(saddr);
}
-bool srs_is_digit_number(const string& str)
-{
- if (str.empty()) {
- return false;
- }
-
- int v = ::atoi(str.c_str());
- int powv = (int)pow(10, str.length() - 1);
- return v / powv >= 1 && v / powv <= 9;
-}
-
bool srs_is_boolean(const string& str)
{
return str == "true" || str == "false";
diff --git a/trunk/src/app/srs_app_utility.hpp b/trunk/src/app/srs_app_utility.hpp
index e058e0a93..5e4d09afe 100644
--- a/trunk/src/app/srs_app_utility.hpp
+++ b/trunk/src/app/srs_app_utility.hpp
@@ -640,12 +640,6 @@ extern int srs_get_local_port(int fd);
// Where peer ip is the client public ip which connected to server.
extern std::string srs_get_peer_ip(int fd);
-// Whether string is digit number
-// is_digit("1234567890") === true
-// is_digit("0123456789") === false
-// is_digit("1234567890a") === false
-// is_digit("a1234567890") === false
-extern bool srs_is_digit_number(const std::string& str);
// Whether string is boolean
// is_bool("true") == true
// is_bool("false") == true
diff --git a/trunk/src/service/srs_service_utility.cpp b/trunk/src/service/srs_service_utility.cpp
index 434cd9d4d..e6312d272 100644
--- a/trunk/src/service/srs_service_utility.cpp
+++ b/trunk/src/service/srs_service_utility.cpp
@@ -28,6 +28,8 @@
#include
#include
#include
+#include
+#include
#include