RosettaCodeData/Task/Determine-if-a-string-is-numeric/C++/determine-if-a-string-is-numeric-3.cpp

4 lines
108 B
C++
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
bool isNumeric(const std::string& input) {
return std::all_of(input.begin(), input.end(), ::isdigit);
}