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

utf8.h File Reference


Detailed Description

C API: 8-bit Unicode handling macros.

This file defines macros to deal with 8-bit Unicode (UTF-8) code units (bytes) and strings. utf8.h is included by utf.h after unicode/umachine.h and some common definitions.

For more information see utf.h and the ICU User Guide Strings chapter (http://icu-project.org/userguide/strings.html).

Usage: ICU coding guidelines for if() statements should be followed when using these macros. Compound statements (curly braces {}) must be used for if-else-while... bodies and all macro statements should be terminated with semicolon.

Definition in file utf8.h.

#include "unicode/utf.h"

Go to the source code of this file.

Defines

#define U8_APPEND(s, i, capacity, c, isError)
#define U8_APPEND_UNSAFE(s, i, c)
#define U8_BACK_1(s, start, i)
#define U8_BACK_1_UNSAFE(s, i)
#define U8_BACK_N(s, start, i, n)
#define U8_BACK_N_UNSAFE(s, i, n)
#define U8_COUNT_TRAIL_BYTES(leadByte)   (utf8_countTrailBytes[(uint8_t)leadByte])
#define U8_FWD_1(s, i, length)
#define U8_FWD_1_UNSAFE(s, i)
#define U8_FWD_N(s, i, length, n)
#define U8_FWD_N_UNSAFE(s, i, n)
#define U8_GET(s, start, i, length, c)
#define U8_GET_UNSAFE(s, i, c)
#define U8_IS_LEAD(c)   ((uint8_t)((c)-0xc0)<0x3e)
#define U8_IS_SINGLE(c)   (((c)&0x80)==0)
#define U8_IS_TRAIL(c)   (((c)&0xc0)==0x80)
#define U8_LENGTH(c)
#define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes)   ((leadByte)&=(1<<(6-(countTrailBytes)))-1)
#define U8_MAX_LENGTH   4
#define U8_NEXT(s, i, length, c)
#define U8_NEXT_UNSAFE(s, i, c)
#define U8_PREV(s, start, i, c)
#define U8_PREV_UNSAFE(s, i, c)
#define U8_SET_CP_LIMIT(s, start, i, length)
#define U8_SET_CP_LIMIT_UNSAFE(s, i)
#define U8_SET_CP_START(s, start, i)
#define U8_SET_CP_START_UNSAFE(s, i)

Functions

U_STABLE int32_t U_EXPORT2 utf8_appendCharSafeBody (uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError)
U_STABLE int32_t U_EXPORT2 utf8_back1SafeBody (const uint8_t *s, int32_t start, int32_t i)
U_STABLE UChar32 U_EXPORT2 utf8_nextCharSafeBody (const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict)
U_STABLE UChar32 U_EXPORT2 utf8_prevCharSafeBody (const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict)

Variables

U_CFUNC U_IMPORT const uint8_t utf8_countTrailBytes [256]


Generated by  Doxygen 1.6.0   Back to index