Returns the next element as a NUL-terminated char*. If there are no more elements, returns NULL. If the resultLength pointer is not NULL, the length of the string (not counting the terminating NUL) is returned at that address. If an error status is returned, the value at resultLength is undefined.
The returned pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to next, unext, snext, reset, or the enumerator's destructor.
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 UChar* string, it is converted to char* with the invariant converter. If the conversion fails (because a character cannot be converted) then status is set to U_INVARIANT_CONVERSION_ERROR and the return value is undefined (though not NULL).
Starting with ICU 2.8, the default implementation calls snext() and handles the conversion.
References StringEnumeration::chars, StringEnumeration::charsCapacity, StringEnumeration::ensureCharsCapacity(), UnicodeString::extract(), INT32_MAX, UnicodeString::length(), NULL, StringEnumeration::snext(), U_SUCCESS, StringEnumeration::unistr, and US_INV.