MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLUTF8Encoder Class Reference

Detailed Description

Provides a simple string wrapper which helps convert strings in various character sets to UTF-8.

Can be created using either a const char* and a given character encoding, or using a wchar_t*, for which encoding is platform-dependent.

Public Member Functions

 TSLUTF8Encoder (const char *value, unsigned int length=0, TSLTextEncoding encoding=TSLTextEncodingSystemCodePage)
 
 TSLUTF8Encoder (const wchar_t *wvalue, unsigned int length=0)
 
 TSLUTF8Encoder (const std::string &value, TSLTextEncoding encoding=TSLTextEncodingSystemCodePage)
 
 TSLUTF8Encoder (const std::wstring &value)
 
 ~TSLUTF8Encoder ()
 
 operator const char * ()
 
 operator char * ()
 

Constructor & Destructor Documentation

◆ TSLUTF8Encoder() [1/4]

TSLUTF8Encoder::TSLUTF8Encoder ( const char * value,
unsigned int length = 0,
TSLTextEncoding encoding = TSLTextEncodingSystemCodePage )
inline

Creates an encoder given a string and an encoding.

Parameters
valueThe input string value, in the specified character encoding.
lengthThe length of the input string, in characters.
encodingThe character encoding of the input string, defaults to the current system encoding.

◆ TSLUTF8Encoder() [2/4]

TSLUTF8Encoder::TSLUTF8Encoder ( const wchar_t * wvalue,
unsigned int length = 0 )
inline

Creates an encoder given a widechar string.

Parameters
wvalueThe input string.
lengthThe length of the input string, in characters.
Note
The character encoding of a widechar-based string is platform-dependent.

◆ TSLUTF8Encoder() [3/4]

TSLUTF8Encoder::TSLUTF8Encoder ( const std::string & value,
TSLTextEncoding encoding = TSLTextEncodingSystemCodePage )
inline

Creates an encoder given a std::string and an encoding.

Parameters
valueThe input string value, in the specified character encoding.
encodingThe character encoding of the input string, defaults to the current system encoding.

◆ TSLUTF8Encoder() [4/4]

TSLUTF8Encoder::TSLUTF8Encoder ( const std::wstring & value)
inline

Creates an encoder given a std::wstring

Parameters
valueThe input string.
Note
The character encoding of a widechar-based string is platform-dependent.

◆ ~TSLUTF8Encoder()

TSLUTF8Encoder::~TSLUTF8Encoder ( )
inline

Member Function Documentation

◆ operator char *()

TSLUTF8Encoder::operator char * ( )
inline

◆ operator const char *()

TSLUTF8Encoder::operator const char * ( )
inline

Gets the strings value as a UTF-8 encoded string.