MCPcopy Create free account
hub / github.com/AimRT/AimRT / IsDigitStr

Function IsDigitStr

src/common/util/string_util.h:495–501  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

493 * @return false Not all composed of numbers
494 */
495inline 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

Callers 4

TESTFunction · 0.85
CleanLogFileMethod · 0.85
GetNextIndexMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68