ICU 49.1.1  49.1.1
unorm2.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2009-2012, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 * file name: unorm2.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2009dec15
14 * created by: Markus W. Scherer
15 */
16 
17 #ifndef __UNORM2_H__
18 #define __UNORM2_H__
19 
31 #include "unicode/utypes.h"
32 #include "unicode/localpointer.h"
33 #include "unicode/uset.h"
34 
42 typedef enum {
85 
111 
116 struct UNormalizer2;
117 typedef struct UNormalizer2 UNormalizer2;
119 #if !UCONFIG_NO_NORMALIZATION
120 
121 #ifndef U_HIDE_DRAFT_API
122 
133 U_DRAFT const UNormalizer2 * U_EXPORT2
134 unorm2_getNFCInstance(UErrorCode *pErrorCode);
135 
147 U_DRAFT const UNormalizer2 * U_EXPORT2
148 unorm2_getNFDInstance(UErrorCode *pErrorCode);
149 
161 U_DRAFT const UNormalizer2 * U_EXPORT2
163 
175 U_DRAFT const UNormalizer2 * U_EXPORT2
177 
189 U_DRAFT const UNormalizer2 * U_EXPORT2
191 #endif /* U_HIDE_DRAFT_API */
192 
214 U_STABLE const UNormalizer2 * U_EXPORT2
215 unorm2_getInstance(const char *packageName,
216  const char *name,
217  UNormalization2Mode mode,
218  UErrorCode *pErrorCode);
219 
235 U_STABLE UNormalizer2 * U_EXPORT2
236 unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode);
237 
244 U_STABLE void U_EXPORT2
245 unorm2_close(UNormalizer2 *norm2);
246 
247 #if U_SHOW_CPLUSPLUS_API
248 
250 
260 U_DEFINE_LOCAL_OPEN_POINTER(LocalUNormalizer2Pointer, UNormalizer2, unorm2_close);
261 
263 
264 #endif
265 
282 U_STABLE int32_t U_EXPORT2
283 unorm2_normalize(const UNormalizer2 *norm2,
284  const UChar *src, int32_t length,
285  UChar *dest, int32_t capacity,
286  UErrorCode *pErrorCode);
305 U_STABLE int32_t U_EXPORT2
307  UChar *first, int32_t firstLength, int32_t firstCapacity,
308  const UChar *second, int32_t secondLength,
309  UErrorCode *pErrorCode);
328 U_STABLE int32_t U_EXPORT2
329 unorm2_append(const UNormalizer2 *norm2,
330  UChar *first, int32_t firstLength, int32_t firstCapacity,
331  const UChar *second, int32_t secondLength,
332  UErrorCode *pErrorCode);
333 
353 U_DRAFT int32_t U_EXPORT2
355  UChar32 c, UChar *decomposition, int32_t capacity,
356  UErrorCode *pErrorCode);
357 
358 #ifndef U_HIDE_DRAFT_API
359 
388 U_DRAFT int32_t U_EXPORT2
390  UChar32 c, UChar *decomposition, int32_t capacity,
391  UErrorCode *pErrorCode);
392 
408 U_DRAFT UChar32 U_EXPORT2
409 unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
410 
420 U_DRAFT uint8_t U_EXPORT2
422 #endif /* U_HIDE_DRAFT_API */
423 
440 U_STABLE UBool U_EXPORT2
441 unorm2_isNormalized(const UNormalizer2 *norm2,
442  const UChar *s, int32_t length,
443  UErrorCode *pErrorCode);
444 
463 unorm2_quickCheck(const UNormalizer2 *norm2,
464  const UChar *s, int32_t length,
465  UErrorCode *pErrorCode);
466 
491 U_STABLE int32_t U_EXPORT2
493  const UChar *s, int32_t length,
494  UErrorCode *pErrorCode);
495 
505 U_STABLE UBool U_EXPORT2
507 
517 U_STABLE UBool U_EXPORT2
519 
528 U_STABLE UBool U_EXPORT2
529 unorm2_isInert(const UNormalizer2 *norm2, UChar32 c);
530 
531 #endif /* !UCONFIG_NO_NORMALIZATION */
532 #endif /* __UNORM2_H__ */