mdz_utf16_create_attached - maxdz-gmbh/mdz_unicode GitHub Wiki
Create empty UTF-16
string with Capacity
== 1 (for 0-terminator), Size
== 0 and Length
== 0.
Memory for utf16 structure starts at position pStart
. Size
of internal utf16 structure (it is usually bigger than mdz_Utf16
!) is returned in pSize.
struct mdz_Utf16* mdz_utf16_create_attached(
const void* pStart,
enum mdz_endianness enEndianness,
size_t nAreaSizeBytes,
size_t* pOutSize);
Parameter | Description |
---|---|
pStart |
memory start position of utf16 structure |
enEndianness |
endianness of string. Should be MDZ_ENDIAN_LITTLE or MDZ_ENDIAN_BIG
|
nAreaSizeBytes |
size of available memory from pStart in bytes. Should be large enough for internal utf16 structure |
pOutSize |
returned actual size of allocated internal utf16 structure in bytes, may be NULL if not needed |
Return | Description |
---|---|
NULL |
if library is not initialized with mdz_unicode_init() call |
NULL |
if invalid enEndianness
|
NULL |
if pStart == NULL or pSize == NULL
|
NULL |
if size in nSize is smaller than size of internal utf16 structure |
Result | pointer to string for use in other mdz_utf16 functions. Normally it equals to pStart
|