| 147 | } |
| 148 | |
| 149 | std::wstring removeZero(double val) |
| 150 | { |
| 151 | std::wstring ret = boost::lexical_cast<std::wstring>(val); |
| 152 | std::wstring::size_type pos = ret.length(); |
| 153 | if (ret.find_first_of(L".") == std::string::npos) |
| 154 | return ret; |
| 155 | for (std::wstring::reverse_iterator rit = ret.rbegin(); rit != ret.rend(); ++rit) { |
| 156 | if (*rit == L'.') { |
| 157 | return ret.substr(0, pos - 1); |
| 158 | } |
| 159 | if (*rit != L'0') { |
| 160 | return ret.substr(0, pos); |
| 161 | } |
| 162 | pos--; |
| 163 | } |
| 164 | return L"0"; |
| 165 | } |
| 166 | |
| 167 | std::vector<std::wstring> splitMultiOptions(const std::wstring& str) |
| 168 | { |
no test coverage detected