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

U_STABLE UDateFormat* U_EXPORT2 udat_clone ( const UDateFormat fmt,
UErrorCode status 
)

Open a copy of a UDateFormat. This function performs a deep copy.

Parameters:
fmt The format to copy
status A pointer to an UErrorCode to receive any errors.
Returns:
A pointer to a UDateFormat identical to fmt. ICU 2.0

Definition at line 147 of file udat.cpp.

References U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

{
    if(U_FAILURE(*status)) return 0;

    Format *res = ((DateFormat*)fmt)->clone();

    if(res == 0) {
        *status = U_MEMORY_ALLOCATION_ERROR;
        return 0;
    }

    return (UDateFormat*) res;
}


Generated by  Doxygen 1.6.0   Back to index