+
+ int32_t cloneSize = 0;
+ uint8_t* cloneBuf = NULL;
+ RuleBasedCollator* clone = NULL;
+ if(col != NULL){
+ RuleBasedCollator* rbc = (RuleBasedCollator*)col;
+ cloneSize = rbc->cloneBinary(NULL, 0, intStatus);
+ intStatus = U_ZERO_ERROR;
+ cloneBuf = (uint8_t*) malloc(cloneSize);
+ cloneSize = rbc->cloneBinary(cloneBuf, cloneSize, intStatus);
+ clone = new RuleBasedCollator(cloneBuf, cloneSize, UCA, intStatus);
+ if(U_FAILURE(intStatus)){
+ errln("Could not clone the RuleBasedCollator. Error: %s", u_errorName(intStatus));
+ intStatus= U_ZERO_ERROR;
+ }