string_traits

primo::avblocks::modern::string_traits

template<typename CharT>
struct string_traits

Maps the character type of the fluent API (char or wchar_t) to the matching string type and converts to and from primo::ustring.

Used by TMediaSocketT, TMediaInfoT and TTranscoderT.

template<>
struct string_traits<char>

Narrow strings: std::string holding UTF-8.

Public Types

using string_type = std::string

The string type: std::string.

Public Static Functions

static inline primo::ustring to_ustring(const string_type &s)

Converts a string to a primo::ustring.

static inline string_type from_ustring(const primo::ustring &u)

Converts a primo::ustring to a string.

template<>
struct string_traits<wchar_t>

Wide strings: std::wstring.

Public Types

using string_type = std::wstring

The string type: std::wstring.

Public Static Functions

static inline primo::ustring to_ustring(const string_type &s)

Converts a string to a primo::ustring.

static inline string_type from_ustring(const primo::ustring &u)

Converts a primo::ustring to a string.