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

U_STABLE UBiDiLevel U_EXPORT2 ubidi_getLevelAt ( const UBiDi pBiDi,
int32_t  charIndex 

Get the level for one character.

pBiDi is the paragraph or line UBiDi object.
charIndex the index of a character. It must be in the range [0..ubidi_getProcessedLength(pBiDi)].
The level for the character at charIndex (0 if charIndex is not in the valid range).
See also:

ubidi_getProcessedLength ICU 2.0

Definition at line 249 of file ubidiln.c.

References UBIDI_MIXED.

    /* return paraLevel if in the trailing WS run, otherwise the real level */
    if(!IS_VALID_PARA_OR_LINE(pBiDi) || charIndex<0 || pBiDi->length<=charIndex) {
        return 0;
    } else if(pBiDi->direction!=UBIDI_MIXED || charIndex>=pBiDi->trailingWSStart) {
        return GET_PARALEVEL(pBiDi, charIndex);
    } else {
        return pBiDi->levels[charIndex];

Generated by  Doxygen 1.6.0   Back to index