| 10 | namespace platform |
| 11 | { |
| 12 | std::string MakeDistanceStr(std::string value, Distance::Units unit) |
| 13 | { |
| 14 | static Locale const loc = GetCurrentLocale(); |
| 15 | |
| 16 | constexpr char kHardCodedGroupingSeparator = ','; |
| 17 | if (auto found = value.find(kHardCodedGroupingSeparator); found != std::string::npos) |
| 18 | value.replace(found, 1, loc.m_groupingSeparator); |
| 19 | |
| 20 | constexpr char kHardCodedDecimalSeparator = '.'; |
| 21 | if (auto found = value.find(kHardCodedDecimalSeparator); found != std::string::npos) |
| 22 | value.replace(found, 1, loc.m_decimalSeparator); |
| 23 | |
| 24 | return value.append(kNarrowNonBreakingSpace).append(DebugPrint(unit)); |
| 25 | } |
| 26 | |
| 27 | struct ScopedSettings |
| 28 | { |
no test coverage detected