Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE UChar32* U_EXPORT2 u_strToUTF32 ( UChar32 dest,
int32_t  destCapacity,
int32_t *  pDestLength,
const UChar *  src,
int32_t  srcLength,
UErrorCode pErrorCode 
)

Convert a UTF-16 string to UTF-32. If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error code is set.

Parameters:
dest A buffer for the result string. The result will be zero-terminated if the buffer is large enough.
destCapacity The size of the buffer (number of UChar32s). If it is 0, then dest may be NULL and the function will only return the length of the result without writing any of the result string (pre-flighting).
pDestLength A pointer to receive the number of units written to the destination. If pDestLength!=NULL then *pDestLength is always set to the number of output units corresponding to the transformation of all the input units, even in case of a buffer overflow.
src The original source string
srcLength The length of the original string. If -1, then src must be zero-terminated.
pErrorCode Must be a valid pointer to an error code value, which must not indicate a failure before the function call.
Returns:
The pointer to destination buffer.
See also:
u_strToUTF32WithSub

u_strFromUTF32 ICU 2.0

Definition at line 240 of file ustrtrns.c.

References NULL, and U_SENTINEL.

                                     {
    return u_strToUTF32WithSub(
            dest, destCapacity, pDestLength,
            src, srcLength,
            U_SENTINEL, NULL,
            pErrorCode);
}


Generated by  Doxygen 1.6.0   Back to index