MCPcopy Create free account
hub / github.com/catboost/catboost / IsNumberT

Function IsNumberT

util/string/type.cpp:19–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18template <typename TStringType>
19static bool IsNumberT(const TStringType& s) noexcept {
20 if (s.empty()) {
21 return false;
22 }
23
24 return std::all_of(s.begin(), s.end(), IsAsciiDigit<typename TStringType::value_type>);
25}
26
27bool IsNumber(const TStringBuf s) noexcept {
28 return IsNumberT(s);

Callers 1

IsNumberFunction · 0.85

Calls 4

all_ofFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected