- const collIterate *ci = &(elems->iteratordata_);
-
- if (ci->offsetRepeatCount > 0 && ci->offsetRepeatValue != 0) {
- return ci->offsetRepeatValue;
- }
-
- if (ci->offsetReturn != NULL) {
- return *ci->offsetReturn;
- }
-
- // while processing characters in normalization buffer getOffset will
- // return the next non-normalized character.
- // should be inline with the old implementation since the old codes uses
- // nextDecomp in normalizer which also decomposes the string till the
- // first base character is found.
- if (ci->flags & UCOL_ITER_INNORMBUF) {
- if (ci->fcdPosition == NULL) {
- return 0;
- }
- return (int32_t)(ci->fcdPosition - ci->string);
- }
- else {
- return (int32_t)(ci->pos - ci->string);
- }