methods Instance methods for converting to other encodings.
 
 
 
methods Instance methods for converting to other encodings.

Functions

MaxStringCastCP  ToCP (UINT codepage, size_t *length=NULL) const
  Returns a MaxStringCastCP which in turn enables casting to a char array encoded with a specific code page.
MaxStringCast< char >  ToACP (size_t *length=NULL) const
  Cast this object to a char array using Active Code Page encoding.
MaxStringCastUTF8  ToUTF8 (size_t *length=NULL) const
  Cast this object to a UTF8 encoded string.
MaxStringCast< wchar_t >  ToUTF16 (size_t *length=NULL) const
  Cast this object to a UTF16 or UNICODE encoded string.
MaxStringCast< unsigned int >  ToUTF32 (size_t *length=NULL) const
  Cast this object to a UTF32 encoded string.

Function Documentation

MaxStringCastCP ToCP ( UINT  codepage,
size_t *  length = NULL 
) const

Returns a MaxStringCastCP which in turn enables casting to a char array encoded with a specific code page.

The char array held by the MaxStringCastCP instance is valid as long as the instance is valid.

Parameters:
codepage - The code page to convert to
length [out] - If length is not null, the size of the resulting string is stored to the length pointer.
Returns:
- A MaxStringCastCP instance that can be used to cast to a char* array.
MaxStringCast<char> ToACP ( size_t *  length = NULL ) const

Cast this object to a char array using Active Code Page encoding.

Parameters:
length [out] - If length is not null, the size of the resulting string is stored to the length pointer.
Returns:
A MaxStringCast<char> instance that can be used to cast to a char* array.
See also:
MaxString::ToCP(UINT,size_t*)
MaxStringCastUTF8 ToUTF8 ( size_t *  length = NULL ) const

Cast this object to a UTF8 encoded string.

Parameters:
length [out] - If length is not null, the size of the resulting string is stored to the length pointer.
Returns:
A MaxStringCastUTF8 instance that can be used to cast to a char* array.
See also:
MaxString::ToCP(UINT,size_t*)
MaxStringCast<wchar_t> ToUTF16 ( size_t *  length = NULL ) const

Cast this object to a UTF16 or UNICODE encoded string.

Parameters:
length [out] - If length is not null, the size of the resulting string is stored to the length pointer.
Returns:
A MaxStringCast<wchar_t> instance that can be used to cast to a wchar_t* array.
See also:
MaxString::ToCP(UINT,size_t*)
MaxStringCast<unsigned int> ToUTF32 ( size_t *  length = NULL ) const

Cast this object to a UTF32 encoded string.

Parameters:
length [out] - If length is not null, the size of the resulting string is stored to the length pointer.
Returns:
A MaxStringCast<unsigned int> instance that can be used to cast to an unsigned int* array.
See also:
MaxString::ToCP(UINT,size_t*)