EHS
ehs::UTF Class Reference

A helper class for converting between UTF8, 16 and 32. More...

#include <UTF.h>

Static Public Member Functions

template<typename N = UInt_64>
static Str< Char_32, N > To_32 (const Char_16 *const from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_32, N > To_32 (const Str< Char_16, N > &from)
 
template<typename N = UInt_64>
static Str< Char_32, N > To_32 (const Char_8 *from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_32, N > To_32 (const Str< Char_8, N > &from)
 
template<typename N = UInt_64>
static Str< Char_16, N > To_16 (const Char_32 *const from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_16, N > To_16 (const Str< Char_32, N > &from)
 
template<typename N = UInt_64>
static Str< Char_16, N > To_16 (const Char_8 *const from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_16, N > To_16 (const Str< Char_8, N > &from)
 
template<typename N = UInt_64>
static Str< Char_8, N > To_8 (const Char_16 *const from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_8, N > To_8 (const Str< Char_16, N > &from)
 
template<typename N = UInt_64>
static Str< Char_8, N > To_8 (const Char_32 *const from, const N size=0)
 
template<typename N = UInt_64>
static Str< Char_8, N > To_8 (const Str< Char_32, N > &from)
 

Detailed Description

A helper class for converting between UTF8, 16 and 32.

Member Function Documentation

◆ To_16() [1/4]

template<typename N = UInt_64>
static Str< Char_16, N > ehs::UTF::To_16 ( const Char_32 *const  from,
const N  size = 0 
)
inlinestatic

Converts the given UTF32 C-style string object into UTF16.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF32 string.
[in]sizeThe size of the give C-style UTF32 string.
Returns
The result.

◆ To_16() [2/4]

template<typename N = UInt_64>
static Str< Char_16, N > ehs::UTF::To_16 ( const Char_8 *const  from,
const N  size = 0 
)
inlinestatic

Converts the given UTF8 C-style string into UTF16.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF8 C-style string.
[in]sizeThe size of the given C-style UTF8 string.
Returns
The result.

◆ To_16() [3/4]

template<typename N = UInt_64>
static Str< Char_16, N > ehs::UTF::To_16 ( const Str< Char_32, N > &  from)
inlinestatic

Converts the given UTF32 string object into UTF16.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF32 string.
Returns
The result.

◆ To_16() [4/4]

template<typename N = UInt_64>
static Str< Char_16, N > ehs::UTF::To_16 ( const Str< Char_8, N > &  from)
inlinestatic

Converts the given UTF8 string object into UTF16.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF8 string.
Returns
The result.

◆ To_32() [1/4]

template<typename N = UInt_64>
static Str< Char_32, N > ehs::UTF::To_32 ( const Char_16 *const  from,
const N  size = 0 
)
inlinestatic

Converts the given UTF16 C-style string into UTF32.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given C-style UTF16 string.
[in]sizeThe size of the given C-style UTF16 string.
Returns
The result.

◆ To_32() [2/4]

template<typename N = UInt_64>
static Str< Char_32, N > ehs::UTF::To_32 ( const Char_8 from,
const N  size = 0 
)
inlinestatic

Converts the given UTF8 C-style string into UTF32.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given C-style UTF8 string.
[in]sizeThe size of the given C-style UTF8 string.
Returns
The result.

◆ To_32() [3/4]

template<typename N = UInt_64>
static Str< Char_32, N > ehs::UTF::To_32 ( const Str< Char_16, N > &  from)
inlinestatic

Converts the given UTF16 string object into UTF32.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF16 string.
Returns
The result.

◆ To_32() [4/4]

template<typename N = UInt_64>
static Str< Char_32, N > ehs::UTF::To_32 ( const Str< Char_8, N > &  from)
inlinestatic

Converts the given UTF8 string object into UTF32.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF8 string.
Returns
The result.

◆ To_8() [1/4]

template<typename N = UInt_64>
static Str< Char_8, N > ehs::UTF::To_8 ( const Char_16 *const  from,
const N  size = 0 
)
inlinestatic

Converts the given UTF16 C-style string into UTF8.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF16 string.
[in]sizeThe size of the given C-style UTF8 string.
Returns
The result.

◆ To_8() [2/4]

template<typename N = UInt_64>
static Str< Char_8, N > ehs::UTF::To_8 ( const Char_32 *const  from,
const N  size = 0 
)
inlinestatic

Converts the given UTF32 C-style string into UTF8.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF32 string.
[in]sizeThe size of the give C-style UTF32 string.
Returns
The result.

◆ To_8() [3/4]

template<typename N = UInt_64>
static Str< Char_8, N > ehs::UTF::To_8 ( const Str< Char_16, N > &  from)
inlinestatic

Converts the given UTF16 string object into UTF8.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF16 string.
Returns
The result.

◆ To_8() [4/4]

template<typename N = UInt_64>
static Str< Char_8, N > ehs::UTF::To_8 ( const Str< Char_32, N > &  from)
inlinestatic

Converts the given UTF32 string object into UTF8.

Template Parameters
NThe number data type to use.
Parameters
[in]fromThe given UTF32 string.
Returns
The result.

The documentation for this class was generated from the following file: