| 6 | namespace op |
| 7 | { |
| 8 | unsigned long long getLastNumber(const std::string& string) |
| 9 | { |
| 10 | try |
| 11 | { |
| 12 | const auto stringNumber = string.substr(string.find_last_not_of("0123456789") + 1); |
| 13 | return std::stoull(stringNumber); |
| 14 | } |
| 15 | catch (const std::exception& e) |
| 16 | { |
| 17 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 18 | return 0ull; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | template<typename T> |
| 23 | std::string toFixedLengthString(const T number, const unsigned long long stringLength) |
no test coverage detected