1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1508, Refactor srs_is_digital, support all zeros.

This commit is contained in:
winlin 2019-12-20 14:49:25 +08:00
parent cee4feda61
commit 4382ced3bf
5 changed files with 38 additions and 18 deletions

View file

@ -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