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

U_STABLE const UChar* U_EXPORT2 uenum_unext ( UEnumeration en,
int32_t *  resultLength,
UErrorCode status 
)

Returns the next element in the iterator's list. If there are no more elements, returns NULL. If the iterator is out-of-sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned. If the native service string is a char* string, it is converted to UChar* with the invariant converter. The result is terminated by (UChar)0.

Parameters:
en the iterator object
resultLength pointer to receive the length of the result (not including the terminating \0). If the pointer is NULL it is ignored.
status the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync with its service.
Returns:
a pointer to the string. The string will be zero-terminated. The return pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to any uenum_... method, including uenum_next() or uenum_unext(). When all strings have been traversed, returns NULL. ICU 2.2

Definition at line 139 of file uenum.c.

References NULL, U_FAILURE, and U_UNSUPPORTED_ERROR.

{
    if (!en || U_FAILURE(*status)) {
        return NULL;
    }
    if (en->uNext != NULL) {
        return en->uNext(en, resultLength, status);
    } else {
        *status = U_UNSUPPORTED_ERROR;
        return NULL;
    }
}


Generated by  Doxygen 1.6.0   Back to index