| 384 | } |
| 385 | |
| 386 | bool EatSuffix(std::string & s, std::string const & suffix) |
| 387 | { |
| 388 | if (!s.ends_with(suffix)) |
| 389 | return false; |
| 390 | |
| 391 | CHECK_LESS_OR_EQUAL(suffix.size(), s.size(), ()); |
| 392 | s = s.substr(0, s.size() - suffix.size()); |
| 393 | return true; |
| 394 | } |
| 395 | |
| 396 | std::string to_string_dac(double d, int dac) |
| 397 | { |