|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * 00006 * Copyright (C) 2009-2015, International Business Machines 00007 * Corporation and others. All Rights Reserved. 00008 * 00009 ******************************************************************************* 00010 * file name: unorm2.h 00011 * encoding: UTF-8 00012 * tab size: 8 (not used) 00013 * indentation:4 00014 * 00015 * created on: 2009dec15 00016 * created by: Markus W. Scherer 00017 */ 00018 00019 #ifndef __UNORM2_H__ 00020 #define __UNORM2_H__ 00021 00033 #include "unicode/utypes.h" 00034 #include "unicode/stringoptions.h" 00035 #include "unicode/uset.h" 00036 00037 #if U_SHOW_CPLUSPLUS_API 00038 #include "unicode/localpointer.h" 00039 #endif // U_SHOW_CPLUSPLUS_API 00040 00048 typedef enum { 00057 UNORM2_COMPOSE, 00066 UNORM2_DECOMPOSE, 00079 UNORM2_FCD, 00089 UNORM2_COMPOSE_CONTIGUOUS 00090 } UNormalization2Mode; 00091 00097 typedef enum UNormalizationCheckResult { 00102 UNORM_NO, 00107 UNORM_YES, 00115 UNORM_MAYBE 00116 } UNormalizationCheckResult; 00117 00122 struct UNormalizer2; 00123 typedef struct UNormalizer2 UNormalizer2; 00125 #if !UCONFIG_NO_NORMALIZATION 00126 00138 U_CAPI const UNormalizer2 * U_EXPORT2 00139 unorm2_getNFCInstance(UErrorCode *pErrorCode); 00140 00152 U_CAPI const UNormalizer2 * U_EXPORT2 00153 unorm2_getNFDInstance(UErrorCode *pErrorCode); 00154 00166 U_CAPI const UNormalizer2 * U_EXPORT2 00167 unorm2_getNFKCInstance(UErrorCode *pErrorCode); 00168 00180 U_CAPI const UNormalizer2 * U_EXPORT2 00181 unorm2_getNFKDInstance(UErrorCode *pErrorCode); 00182 00194 U_CAPI const UNormalizer2 * U_EXPORT2 00195 unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); 00196 00218 U_CAPI const UNormalizer2 * U_EXPORT2 00219 unorm2_getInstance(const char *packageName, 00220 const char *name, 00221 UNormalization2Mode mode, 00222 UErrorCode *pErrorCode); 00223 00239 U_CAPI UNormalizer2 * U_EXPORT2 00240 unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode); 00241 00248 U_CAPI void U_EXPORT2 00249 unorm2_close(UNormalizer2 *norm2); 00250 00251 #if U_SHOW_CPLUSPLUS_API 00252 00253 U_NAMESPACE_BEGIN 00254 00264 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close); 00265 00266 U_NAMESPACE_END 00267 00268 #endif 00269 00286 U_CAPI int32_t U_EXPORT2 00287 unorm2_normalize(const UNormalizer2 *norm2, 00288 const UChar *src, int32_t length, 00289 UChar *dest, int32_t capacity, 00290 UErrorCode *pErrorCode); 00309 U_CAPI int32_t U_EXPORT2 00310 unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2, 00311 UChar *first, int32_t firstLength, int32_t firstCapacity, 00312 const UChar *second, int32_t secondLength, 00313 UErrorCode *pErrorCode); 00332 U_CAPI int32_t U_EXPORT2 00333 unorm2_append(const UNormalizer2 *norm2, 00334 UChar *first, int32_t firstLength, int32_t firstCapacity, 00335 const UChar *second, int32_t secondLength, 00336 UErrorCode *pErrorCode); 00337 00357 U_CAPI int32_t U_EXPORT2 00358 unorm2_getDecomposition(const UNormalizer2 *norm2, 00359 UChar32 c, UChar *decomposition, int32_t capacity, 00360 UErrorCode *pErrorCode); 00361 00391 U_CAPI int32_t U_EXPORT2 00392 unorm2_getRawDecomposition(const UNormalizer2 *norm2, 00393 UChar32 c, UChar *decomposition, int32_t capacity, 00394 UErrorCode *pErrorCode); 00395 00411 U_CAPI UChar32 U_EXPORT2 00412 unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b); 00413 00423 U_CAPI uint8_t U_EXPORT2 00424 unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c); 00425 00442 U_CAPI UBool U_EXPORT2 00443 unorm2_isNormalized(const UNormalizer2 *norm2, 00444 const UChar *s, int32_t length, 00445 UErrorCode *pErrorCode); 00446 00464 U_CAPI UNormalizationCheckResult U_EXPORT2 00465 unorm2_quickCheck(const UNormalizer2 *norm2, 00466 const UChar *s, int32_t length, 00467 UErrorCode *pErrorCode); 00468 00493 U_CAPI int32_t U_EXPORT2 00494 unorm2_spanQuickCheckYes(const UNormalizer2 *norm2, 00495 const UChar *s, int32_t length, 00496 UErrorCode *pErrorCode); 00497 00507 U_CAPI UBool U_EXPORT2 00508 unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c); 00509 00519 U_CAPI UBool U_EXPORT2 00520 unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c); 00521 00530 U_CAPI UBool U_EXPORT2 00531 unorm2_isInert(const UNormalizer2 *norm2, UChar32 c); 00532 00599 U_CAPI int32_t U_EXPORT2 00600 unorm_compare(const UChar *s1, int32_t length1, 00601 const UChar *s2, int32_t length2, 00602 uint32_t options, 00603 UErrorCode *pErrorCode); 00604 00605 #endif /* !UCONFIG_NO_NORMALIZATION */ 00606 #endif /* __UNORM2_H__ */
1.7.6.1