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

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

Convert a UTF-32 string to UTF-16. 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 UChars). 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_strFromUTF32WithSub

u_strToUTF32 ICU 2.0

Definition at line 134 of file ustrtrns.c.

References NULL, and U_SENTINEL.

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


Generated by  Doxygen 1.6.0   Back to index