* @brief determines whether the string is composed of numbers * * @param[in] str string to be judged * @return true All are composed of numbers * @return false Not all composed of numbers */
| 493 | * @return false Not all composed of numbers |
| 494 | */ |
| 495 | inline bool IsDigitStr(std::string_view str) { |
| 496 | if (str.length() == 0) return false; |
| 497 | for (const auto& c : str) { |
| 498 | if (c > '9' || c < '0') return false; |
| 499 | } |
| 500 | return true; |
| 501 | } |
| 502 | |
| 503 | /** |
| 504 | * @brief Get the collection of keys in map |
no outgoing calls