ICU 51.2  51.2
unorm2.h
Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 2009-2013, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *   file name:  unorm2.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 *
00013 *   created on: 2009dec15
00014 *   created by: Markus W. Scherer
00015 */
00016 
00017 #ifndef __UNORM2_H__
00018 #define __UNORM2_H__
00019 
00031 #include "unicode/utypes.h"
00032 #include "unicode/localpointer.h"
00033 #include "unicode/uset.h"
00034 
00042 typedef enum {
00051     UNORM2_COMPOSE,
00060     UNORM2_DECOMPOSE,
00073     UNORM2_FCD,
00083     UNORM2_COMPOSE_CONTIGUOUS
00084 } UNormalization2Mode;
00085 
00091 typedef enum UNormalizationCheckResult {
00096   UNORM_NO,
00101   UNORM_YES,
00109   UNORM_MAYBE
00110 } UNormalizationCheckResult;
00111 
00116 struct UNormalizer2;
00117 typedef struct UNormalizer2 UNormalizer2;  
00119 #if !UCONFIG_NO_NORMALIZATION
00120 
00132 U_STABLE const UNormalizer2 * U_EXPORT2
00133 unorm2_getNFCInstance(UErrorCode *pErrorCode);
00134 
00146 U_STABLE const UNormalizer2 * U_EXPORT2
00147 unorm2_getNFDInstance(UErrorCode *pErrorCode);
00148 
00160 U_STABLE const UNormalizer2 * U_EXPORT2
00161 unorm2_getNFKCInstance(UErrorCode *pErrorCode);
00162 
00174 U_STABLE const UNormalizer2 * U_EXPORT2
00175 unorm2_getNFKDInstance(UErrorCode *pErrorCode);
00176 
00188 U_STABLE const UNormalizer2 * U_EXPORT2
00189 unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
00190 
00212 U_STABLE const UNormalizer2 * U_EXPORT2
00213 unorm2_getInstance(const char *packageName,
00214                    const char *name,
00215                    UNormalization2Mode mode,
00216                    UErrorCode *pErrorCode);
00217 
00233 U_STABLE UNormalizer2 * U_EXPORT2
00234 unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode);
00235 
00242 U_STABLE void U_EXPORT2
00243 unorm2_close(UNormalizer2 *norm2);
00244 
00245 #if U_SHOW_CPLUSPLUS_API
00246 
00247 U_NAMESPACE_BEGIN
00248 
00258 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close);
00259 
00260 U_NAMESPACE_END
00261 
00262 #endif
00263 
00280 U_STABLE int32_t U_EXPORT2
00281 unorm2_normalize(const UNormalizer2 *norm2,
00282                  const UChar *src, int32_t length,
00283                  UChar *dest, int32_t capacity,
00284                  UErrorCode *pErrorCode);
00303 U_STABLE int32_t U_EXPORT2
00304 unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
00305                                 UChar *first, int32_t firstLength, int32_t firstCapacity,
00306                                 const UChar *second, int32_t secondLength,
00307                                 UErrorCode *pErrorCode);
00326 U_STABLE int32_t U_EXPORT2
00327 unorm2_append(const UNormalizer2 *norm2,
00328               UChar *first, int32_t firstLength, int32_t firstCapacity,
00329               const UChar *second, int32_t secondLength,
00330               UErrorCode *pErrorCode);
00331 
00351 U_STABLE int32_t U_EXPORT2
00352 unorm2_getDecomposition(const UNormalizer2 *norm2,
00353                         UChar32 c, UChar *decomposition, int32_t capacity,
00354                         UErrorCode *pErrorCode);
00355 
00385 U_STABLE int32_t U_EXPORT2
00386 unorm2_getRawDecomposition(const UNormalizer2 *norm2,
00387                            UChar32 c, UChar *decomposition, int32_t capacity,
00388                            UErrorCode *pErrorCode);
00389 
00405 U_STABLE UChar32 U_EXPORT2
00406 unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
00407 
00417 U_STABLE uint8_t U_EXPORT2
00418 unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c);
00419 
00436 U_STABLE UBool U_EXPORT2
00437 unorm2_isNormalized(const UNormalizer2 *norm2,
00438                     const UChar *s, int32_t length,
00439                     UErrorCode *pErrorCode);
00440 
00458 U_STABLE UNormalizationCheckResult U_EXPORT2
00459 unorm2_quickCheck(const UNormalizer2 *norm2,
00460                   const UChar *s, int32_t length,
00461                   UErrorCode *pErrorCode);
00462 
00487 U_STABLE int32_t U_EXPORT2
00488 unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
00489                          const UChar *s, int32_t length,
00490                          UErrorCode *pErrorCode);
00491 
00501 U_STABLE UBool U_EXPORT2
00502 unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c);
00503 
00513 U_STABLE UBool U_EXPORT2
00514 unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c);
00515 
00524 U_STABLE UBool U_EXPORT2
00525 unorm2_isInert(const UNormalizer2 *norm2, UChar32 c);
00526 
00527 #endif  /* !UCONFIG_NO_NORMALIZATION */
00528 #endif  /* __UNORM2_H__ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines