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

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

2024-04-19 16:56:29 -07:00
bool isNumeric(const std::string& input) {
return std::all_of(input.begin(), input.end(), ::isdigit);
}