| 48 | } |
| 49 | |
| 50 | bool isStringInt(const std::string& str) |
| 51 | { |
| 52 | if (!str.empty()) |
| 53 | { |
| 54 | if (str.substr(0, 1) == "-") |
| 55 | { |
| 56 | std::string withoutSign = str.substr(1); |
| 57 | return all_of(withoutSign.begin(), withoutSign.end(), isdigit); |
| 58 | } |
| 59 | return all_of(str.begin(), str.end(), isdigit); |
| 60 | } |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | bool isStringFloat(const std::string& str) |
| 65 | { |
no test coverage detected