1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 4 ******************************************************************************* 6 * Copyright (C) 1999-2011, International Business Machines 7 * Corporation and others. All Rights Reserved. 9 ******************************************************************************* 12 * tab size: 8 (not used) 15 * created on: 1999sep09 16 * created by: Markus W. Scherer 120 /* include the utfXX.h after the following definitions */ 122 /* single-code point definitions -------------------------------------------- */ 124 #ifndef U_HIDE_DRAFT_API 136 #define U_IS_CODE_POINT(c) ((uint32_t)(c)<=0x10ffff) 149 #define U_IS_SCALAR_VALUE(c) ((uint32_t)(c)<0xd800 || (0xe000<=(c) && (c)<=0x10ffff)) 151 #endif// U_HIDE_DRAFT_API 161 #define U_IS_UNICODE_NONCHAR(c) \ 163 ((c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (c)<=0x10ffff) 182 #define U_IS_UNICODE_CHAR(c) \ 183 ((uint32_t)(c)<0xd800 || \ 184 (0xe000<=(c) && (c)<=0x10ffff && !U_IS_UNICODE_NONCHAR(c))) 192 #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) 200 #define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) 208 #define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) 216 #define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) 224 #define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) 233 #define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) 242 #define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) 244 /* include the utfXX.h ------------------------------------------------------ */ 246 #if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS 251 /* utf_old.h contains deprecated, pre-ICU 2.4 definitions */ 254 #endif/* !U_NO_DEFAULT_INCLUDE_UTF_HEADERS */ 256 #endif/* __UTF_H__ */ Basic types and constants for UTF.
C API: 16-bit Unicode handling macros.
C API: 8-bit Unicode handling macros.
C API: Deprecated macros for Unicode string handling.