MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / Convert

Method Convert

FastCopy/NumberToStringConverter.cpp:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 winrt::Windows::Foundation::IInspectable NumberToStringConverter::Convert(
32 winrt::Windows::Foundation::IInspectable const& value,
33 [[maybe_unused]] winrt::Windows::UI::Xaml::Interop::TypeName const& targetType,
34 [[maybe_unused]] winrt::Windows::Foundation::IInspectable const& parameter,
35 [[maybe_unused]] winrt::hstring const& language)
36 {
37 auto const byteValue = winrt::unbox_value<uint64_t>(value);
38 auto const [converted, unit] = ConvertUnit(byteValue);
39 return winrt::box_value(std::format(L"{:.2f} {}", converted, unit));
40 }
41
42 winrt::Windows::Foundation::IInspectable NumberToStringConverter::ConvertBack(
43 [[maybe_unused]] winrt::Windows::Foundation::IInspectable const& value,

Callers

nothing calls this directly

Calls 1

ConvertUnitFunction · 0.85

Tested by

no test coverage detected