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

U_STABLE void U_EXPORT2 ucol_reset ( UCollationElements elems  ) 

Reset the collation elements to their initial state. This will move the 'cursor' to the beginning of the text. Property settings for collation will be reset to the current status.

Parameters:
elems The UCollationElements to reset.
See also:
ucol_next

ucol_previous ICU 2.0

Definition at line 367 of file ucoleitr.cpp.

References NULL, TRUE, u_strlen(), and UCOL_ON.

{
    collIterate *ci = &(elems->iteratordata_);
    elems->reset_   = TRUE;
    ci->pos         = ci->string;
    if ((ci->flags & UCOL_ITER_HASLEN) == 0 || ci->endp == NULL) {
        ci->endp      = ci->string + u_strlen(ci->string);
    }
    ci->CEpos       = ci->toReturn = ci->CEs;
    ci->flags       = (ci->flags & UCOL_FORCE_HAN_IMPLICIT) | UCOL_ITER_HASLEN;
    if (ci->coll->normalizationMode == UCOL_ON) {
        ci->flags |= UCOL_ITER_NORM;
    }

    ci->writableBuffer.remove();
    ci->fcdPosition = NULL;

  //ci->offsetReturn = ci->offsetStore = NULL;
      ci->offsetRepeatCount = ci->offsetRepeatValue = 0;
}


Generated by  Doxygen 1.6.0   Back to index