| 700 | } |
| 701 | |
| 702 | std::string replaceUnitString(const std::string& text, const std::string& newUnitString) { |
| 703 | std::string toReplace = extractUnitString(text); |
| 704 | std::string result(text); |
| 705 | if (!toReplace.empty()) { |
| 706 | result = |
| 707 | boost::regex_replace(text, boost::regex(toReplace, boost::regex_constants::literal), newUnitString, boost::regex_constants::format_literal); |
| 708 | } |
| 709 | return result; |
| 710 | } |
| 711 | |
| 712 | bool isUnitString(const std::string& unitString) { |
| 713 | OptionalUnit unit = createUnit(unitString); |
nothing calls this directly
no test coverage detected