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

#define U8_GET ( s,
start,
i,
length,
 ) 

Value:

{ \
    int32_t _u8_get_index=(int32_t)(i); \
    U8_SET_CP_START(s, start, _u8_get_index); \
    U8_NEXT(s, _u8_get_index, length, c); \
}
Get a code point from a string at a random-access offset, without changing the offset. The offset may point to either the lead byte or one of the trail bytes for a code point, in which case the macro will read all of the bytes for the code point. If the offset points to an illegal UTF-8 byte sequence, then c is set to a negative value. Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT.

Parameters:
s const uint8_t * string
start starting string offset
i string offset, must be start<=i<length
length string length
c output UChar32 variable, set to <0 in case of an error
See also:
U8_GET_UNSAFE ICU 2.4

Definition at line 221 of file utf8.h.


Generated by  Doxygen 1.6.0   Back to index