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

#define U8_LENGTH (  ) 

Value:

((uint32_t)(c)<=0x7f ? 1 : \
        ((uint32_t)(c)<=0x7ff ? 2 : \
            ((uint32_t)(c)<=0xd7ff ? 3 : \
                ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : \
                    ((uint32_t)(c)<=0xffff ? 3 : 4)\
                ) \
            ) \
        ) \
    )
How many code units (bytes) are used for the UTF-8 encoding of this Unicode code point?
Parameters:
c 32-bit code point
Returns:
1..4, or 0 if c is a surrogate or not a Unicode code point ICU 2.4

Definition at line 163 of file utf8.h.

Referenced by u_strToUTF8WithSub().


Generated by  Doxygen 1.6.0   Back to index