Sunshine v2026.319.132152
Self-hosted game stream host for Moonlight.
utf_utils.h File Reference

Minimal UTF conversion utilities for Windows tools. More...

#include <string>
Include dependency graph for utf_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::wstring utf_utils::from_utf8 (const std::string &string)
 Convert a UTF-8 string into a UTF-16 wide string.
 
std::string utf_utils::to_utf8 (const std::wstring &string)
 Convert a UTF-16 wide string into a UTF-8 string.
 

Detailed Description

Minimal UTF conversion utilities for Windows tools.

Function Documentation

◆ from_utf8()

std::wstring utf_utils::from_utf8 ( const std::string & string)

Convert a UTF-8 string into a UTF-16 wide string.

Parameters
stringThe UTF-8 string.
Returns
The converted UTF-16 wide string.

◆ to_utf8()

std::string utf_utils::to_utf8 ( const std::wstring & string)

Convert a UTF-16 wide string into a UTF-8 string.

Parameters
stringThe UTF-16 wide string.
Returns
The converted UTF-8 string.