A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/uwp/cpp-ref-for-winrt/to-string below:

winrt::to_string function (C++/WinRT) - Windows UWP applications

winrt::to_string function (C++/WinRT)

In this article

A helper function that converts an input wide string to a std::string containing a UTF-8 narrow string by calling WideCharToMultiByte. For more info, and a code example, see winrt::hstring functions and operators.

Syntax
inline std::string to_string(std::wstring_view value);
Parameters

value A std::wstring_view value, or any value of a type convertible to std::wstring_view, to convert into a UTF-8 narrow string. This can be a winrt::hstring, thanks to hstring's conversion operator to std::wstring_view.

Return value

A std::string containing a UTF-8 narrow string resulting from converting the parameter.

Requirements

Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)

Namespace: winrt

Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)

See also

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4