ArcGIS Procedural Runtime  3.2.10650
Functions
prt::StringUtils Namespace Reference

Description

Utilities for string encoding.

Functions

char * percentEncode (const char *utf8String, char *result, size_t *resultSize, Status *stat=0)
 
char * toOSNarrowFromUTF16 (const wchar_t *utf16String, char *result, size_t *resultSize, Status *stat=0)
 
wchar_t * toUTF16FromOSNarrow (const char *osString, wchar_t *result, size_t *resultSize, Status *stat=0)
 
wchar_t * toUTF16FromUTF8 (const char *utf8String, wchar_t *result, size_t *resultSize, Status *stat=0)
 
char * toUTF8FromUTF16 (const wchar_t *utf16String, char *result, size_t *resultSize, Status *stat=0)
 

Function Documentation

◆ percentEncode()

char* prt::StringUtils::percentEncode ( const char *  utf8String,
char *  result,
size_t *  resultSize,
Status stat = 0 
)

Percent-encodes a UTF8 string.

Parameters
utf8StringThe string to encode.
[in,out]resultPointer to buffer to receive the null-terminated encoded representation.
[in,out]resultSizePointer to size of reserved buffer; returns the size of the actual result (incl. terminating 0). Is always greater than 0.
[out]statOptional pointer to return the status.
Returns
result.

◆ toOSNarrowFromUTF16()

char* prt::StringUtils::toOSNarrowFromUTF16 ( const wchar_t *  utf16String,
char *  result,
size_t *  resultSize,
Status stat = 0 
)

Converts a UTF16 wide string to a narrow string with default platform encoding.

Parameters
utf16StringThe string to convert.
[in,out]resultPointer to buffer to receive the null-terminated encoded representation.
[in,out]resultSizePointer to size of reserved buffer; returns the size of the actual result (incl. terminating 0). Is always greater than 0.
[out]statOptional pointer to return the status.
Returns
result.

◆ toUTF16FromOSNarrow()

wchar_t* prt::StringUtils::toUTF16FromOSNarrow ( const char *  osString,
wchar_t *  result,
size_t *  resultSize,
Status stat = 0 
)

Converts a narrow string with default platform encoding to a UTF16 wide string.

Parameters
osStringThe string to convert.
[in,out]resultPointer to buffer to receive the null-terminated encoded representation.
[in,out]resultSizePointer to size of reserved buffer; returns the size of the actual result (incl. terminating 0). Is always greater than 0.
[out]statOptional pointer to return the status.
Returns
result.

◆ toUTF16FromUTF8()

wchar_t* prt::StringUtils::toUTF16FromUTF8 ( const char *  utf8String,
wchar_t *  result,
size_t *  resultSize,
Status stat = 0 
)

Converts a UTF8 narrow string to a UTF16 wide string.

Parameters
utf8StringThe string to convert.
[in,out]resultPointer to buffer to receive the null-terminated encoded representation.
[in,out]resultSizePointer to size of reserved buffer; returns the size of the actual result (incl. terminating 0). Is always greater than 0.
[out]statOptional pointer to return the status.
Returns
result.

◆ toUTF8FromUTF16()

char* prt::StringUtils::toUTF8FromUTF16 ( const wchar_t *  utf16String,
char *  result,
size_t *  resultSize,
Status stat = 0 
)

Converts a UTF16 wide string to a UTF8 narrow string.

Parameters
utf16StringThe string to convert.
[in,out]resultPointer to buffer to receive the null-terminated encoded representation.
[in,out]resultSizePointer to size of reserved buffer; returns the size of the actual result (incl. terminating 0). Is always greater than 0.
[out]statOptional pointer to return the status.
Returns
result.