Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::PLATFORM::WINDOWS Namespace Reference

Functions

std::string FromW (const wchar_t *str, size_t length)
 
std::string FromW (const std::wstring &str)
 
std::wstring ToW (const char *str, size_t length)
 
std::wstring ToW (const std::string &str)
 

Function Documentation

◆ FromW() [1/2]

std::string KODI::PLATFORM::WINDOWS::FromW ( const std::wstring & str)

Convert UTF-16 to UTF-8 strings Windows specific method to avoid initialization issues and locking issues that are unique to Windows as API calls expect UTF-16 strings

Parameters
str[in]string to be converted
Returns
utf8 string, empty string on failure

◆ FromW() [2/2]

std::string KODI::PLATFORM::WINDOWS::FromW ( const wchar_t * str,
size_t length )

Convert UTF-16 to UTF-8 strings Windows specific method to avoid initialization issues and locking issues that are unique to Windows as API calls expect UTF-16 strings

Parameters
str[in]string to be converted
length[in]length in characters of the string
Returns
utf8 string, empty string on failure

◆ ToW() [1/2]

std::wstring KODI::PLATFORM::WINDOWS::ToW ( const char * str,
size_t length )

Convert UTF-8 to UTF-16 strings Windows specific method to avoid initialization issues and locking issues that are unique to Windows as API calls expect UTF-16 strings

Parameters
str[in]string to be converted
length[in]length in characters of the string
Returns
UTF-16 string, empty string on failure

◆ ToW() [2/2]

std::wstring KODI::PLATFORM::WINDOWS::ToW ( const std::string & str)

Convert UTF-8 to UTF-16 strings Windows specific method to avoid initialization issues and locking issues that are unique to Windows as API calls expect UTF-16 strings

Parameters
str[in]string to be converted
Returns
UTF-16 string, empty string on failure