MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / IsDigit

Method IsDigit

src/base/AFStringUtils.hpp:1034–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032 }
1033
1034 static bool IsDigit(const std::string& str)
1035 {
1036 if (str.empty())
1037 {
1038 return false;
1039 }
1040
1041 std::string::const_iterator start = str.begin();
1042 if (*start == '-')
1043 {
1044 ++start;
1045 }
1046
1047 return (std::all_of(start, str.end(), [](unsigned char c) { return isdigit(c); }));
1048 }
1049
1050 // URL encode & decode
1051 static bool URLEncode(const char* url, size_t url_len, char* edcoded_url, size_t& edcoded_url_len)

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected