Photon Fusion 2.0.4

Classes | Static Public Member Functions | List of all members
UTF32Tools Class Reference

UTF32Tools provides a set of methods to work with UTF32 encoded strings. More...

Classes

struct  CharEnumerator
 Enumerates the characters in a UTF-32 encoded string. More...
 
struct  ConversionResult
 Represents the result of a conversion operation, containing the number of characters and code points processed. More...
 

Static Public Member Functions

static ConversionResult Convert (char *str, int strLength, uint *dst, int dstCapacity)
 Converts a UTF-16 encoded string to a UTF-32 encoded representation. More...
 
static ConversionResult Convert (string str, uint *dst, int dstCapacity)
 Converts a UTF-16 encoded string to a UTF-32 encoded representation. More...
 
static int GetLength (string str)
 Gets the length of a UTF-32 encoded string. More...
 

Detailed Description

UTF32Tools provides a set of methods to work with UTF32 encoded strings.

Member Function Documentation

◆ Convert() [1/2]

static ConversionResult Convert ( char *  str,
int  strLength,
uint *  dst,
int  dstCapacity 
)
static

Converts a UTF-16 encoded string to a UTF-32 encoded representation.

Parameters
strA pointer to the UTF-16 encoded string to convert.
strLengthThe length of the UTF-16 encoded string.
dstA pointer to the destination buffer where the UTF-32 encoded result will be stored.
dstCapacityThe capacity of the destination buffer.
Returns
A ConversionResult containing the number of characters and code points processed.

◆ Convert() [2/2]

static ConversionResult Convert ( string  str,
uint *  dst,
int  dstCapacity 
)
static

Converts a UTF-16 encoded string to a UTF-32 encoded representation.

Parameters
strThe UTF-16 encoded string to convert.
dstA pointer to the destination buffer where the UTF-32 encoded result will be stored.
dstCapacityThe capacity of the destination buffer.
Returns
A ConversionResult containing the number of characters and code points processed.

◆ GetLength()

static int GetLength ( string  str)
static

Gets the length of a UTF-32 encoded string.

Parameters
strThe UTF-16 encoded string to measure.
Returns
The length of the UTF-32 encoded string.