MCPcopy Create free account
hub / github.com/comaps/comaps / GetPlatformLocalizedString

Function GetPlatformLocalizedString

libs/i18n/duration.cpp:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88std::string GetPlatformLocalizedString(Duration const & duration)
89{
90 struct InitSeparators
91 {
92 std::string_view m_unitSep, m_groupingSep;
93 InitSeparators()
94 {
95 auto const loc = GetCurrentLocale();
96 m_unitSep = GetUnitSeparator(loc);
97 m_groupingSep = GetUnitsGroupingSeparator(loc);
98 }
99 };
100 static InitSeparators seps;
101
102 return GetString(duration, {Duration::Units::Days, Duration::Units::Hours, Duration::Units::Minutes}, seps.m_unitSep,
103 seps.m_groupingSep);
104}
105
106std::string GetUnitsString(Duration::Units unit)
107{

Callers 2

GetFormattedDurationMethod · 0.85
SetTitlesForTrackMethod · 0.85

Calls 1

GetStringFunction · 0.70

Tested by

no test coverage detected