static U_INLINE void ucnv_extWriteToU(UConverter *cnv, const int32_t *cx, uint32_t value, UChar **target, const UChar *targetLimit, int32_t **offsets, int32_t srcIndex, UErrorCode *pErrorCode) { /* output the result */ if(UCNV_EXT_TO_U_IS_CODE_POINT(value)) { /* output a single code point */ ucnv_toUWriteCodePoint( cnv, UCNV_EXT_TO_U_GET_CODE_POINT(value), target, targetLimit, offsets, srcIndex, pErrorCode); } else { /* output a string - with correct data we have resultLength>0 */ ucnv_toUWriteUChars( cnv, UCNV_EXT_ARRAY(cx, UCNV_EXT_TO_U_UCHARS_INDEX, UChar)+ UCNV_EXT_TO_U_GET_INDEX(value), UCNV_EXT_TO_U_GET_LENGTH(value), target, targetLimit, offsets, srcIndex, pErrorCode); } }
U_CAPI void U_EXPORT2 ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args, const UChar* source, int32_t length, int32_t offsetIndex, UErrorCode * err) { if(U_FAILURE(*err)) { return; } ucnv_toUWriteUChars( args->converter, source, length, &args->target, args->targetLimit, &args->offsets, offsetIndex, err); }