PLCnext API Documentation 25.0.2.69
Static Public Member Functions | List of all members
Arp::System::Commons::Encoding::Utf16 Class Reference

This static class provides encoding string operations from UTF8 to UTF16 or vice versa. More...

#include <Utf16.hpp>

Static Public Member Functions

static EncodingResult ConvertToUtf8 (const char16 *pInput, size_t inputLength, char8 *pResult, size_t resultCapacity, size_t &resultLength)
 This operation encodes an UTF16 string to an UTF8 string. More...
 
static EncodingResult ConvertToUtf8 (const char16 *pInput, size_t inputLength, String &result)
 This operation encodes an UTF16 string to an UTF8 string. More...
 
static EncodingResult ConvertFromUtf8 (const char8 *pInput, size_t inputLength, char16 *pResult, size_t resultCapacity, size_t &resultLength)
 This operation encodes an UTF8 string to an UTF16 string. More...
 
static EncodingResult ConvertFromUtf8 (const String &input, char16 *pResult, size_t resultCapacity, size_t &resultLength)
 This operation encodes an UTF8 string to an UTF16 string. More...
 

Detailed Description

This static class provides encoding string operations from UTF8 to UTF16 or vice versa.

Member Function Documentation

◆ ConvertFromUtf8() [1/2]

EncodingResult Arp::System::Commons::Encoding::Utf16::ConvertFromUtf8 ( const char8 *  pInput,
size_t  inputLength,
char16 *  pResult,
size_t  resultCapacity,
size_t &  resultLength 
)
static

This operation encodes an UTF8 string to an UTF16 string.

Parameters
pInputThe UTF8 input string to encode.
inputLengthThe length of the input string in bytes excluding null terminator.
pResultThe resulting UTF16 string.
resultCapacityThe capacity of the given result string pResult , i.e. the count of available char16 characters.
resultLengthThe length of the resulting UTF16 string after encoding in bytes excluding null terminator.
Returns
The encoding result.

◆ ConvertFromUtf8() [2/2]

EncodingResult Arp::System::Commons::Encoding::Utf16::ConvertFromUtf8 ( const String input,
char16 *  pResult,
size_t  resultCapacity,
size_t &  resultLength 
)
static

This operation encodes an UTF8 string to an UTF16 string.

Parameters
pInputThe UTF8 input string to encode.
inputLengthThe length of the input string in bytes excluding null terminator.
pResultThe resulting UTF16 string.
resultCapacityThe capacity of the given result string pResult , i.e. the count of available char16 characters.
resultLengthThe length of the resulting UTF16 string after encoding w/o null terminator.

◆ ConvertToUtf8() [1/2]

EncodingResult Arp::System::Commons::Encoding::Utf16::ConvertToUtf8 ( const char16 *  pInput,
size_t  inputLength,
char8 *  pResult,
size_t  resultCapacity,
size_t &  resultLength 
)
static

This operation encodes an UTF16 string to an UTF8 string.

Parameters
pInputThe UTF16 input string to encode.
inputLengthThe length of the input string excluding null terminator, i.e. the count of char16 characters.
pResultThe resulting UTF8 string.
resultCapacityThe capacity of the given result string pResult in bytes .
resultLengthThe length of the resulting UTF8 string after encoding w/o null terminator.
Returns
The encoding result.

◆ ConvertToUtf8() [2/2]

EncodingResult Arp::System::Commons::Encoding::Utf16::ConvertToUtf8 ( const char16 *  pInput,
size_t  inputLength,
String result 
)
static

This operation encodes an UTF16 string to an UTF8 string.

Parameters
pInputThe UTF16 input string to encode.
inputLengthThe length of the input string excluding null terminator, i.e. the count of char16 characters.
resultThe resulting UTF8 string.

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