ICU 56.1: unorm.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

unorm.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (c) 1996-2015, International Business Machines Corporation
4 * and others. All Rights Reserved.
5 *******************************************************************************
6 * File unorm.h
7 *
8 * Created by: Vladimir Weinstein 12052000
9 *
10 * Modification history :
11 *
12 * Date Name Description
13 * 02/01/01 synwee Added normalization quickcheck enum and method.
14 */
15 #ifndef UNORM_H
16 #define UNORM_H
17
18 #include "unicode/utypes.h"
19
20 #if !UCONFIG_NO_NORMALIZATION
21
22 #include "unicode/uiter.h"
23 #include "unicode/unorm2.h"
24
25 #ifndef U_HIDE_DEPRECATED_API
26
132 #ifndef U_HIDE_DEPRECATED_API
133
137 typedef enum {
139 UNORM_NONE = 1,
141 UNORM_NFD = 2,
143 UNORM_NFKD = 3,
145 UNORM_NFC = 4,
147 UNORM_DEFAULT = UNORM_NFC,
149 UNORM_NFKC =5,
151 UNORM_FCD = 6,
152
154 UNORM_MODE_COUNT
155 } UNormalizationMode;
156 #endif /* U_HIDE_DEPRECATED_API */
157
165 enum {
172 UNORM_UNICODE_3_2=0x20
173 };
174
190 #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
191
211 U_STABLE int32_t U_EXPORT2
212 unorm_normalize(const UChar *source, int32_t sourceLength,
213 UNormalizationMode mode, int32_t options,
214 UChar *result, int32_t resultLength,
215 UErrorCode *status);
216
237 U_STABLE UNormalizationCheckResult U_EXPORT2
238 unorm_quickCheck(const UChar *source, int32_t sourcelength,
239 UNormalizationMode mode,
240 UErrorCode *status);
241
258 U_STABLE UNormalizationCheckResult U_EXPORT2
259 unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
260 UNormalizationMode mode, int32_t options,
261 UErrorCode *pErrorCode);
262
284 U_STABLE UBool U_EXPORT2
285 unorm_isNormalized(const UChar *src, int32_t srcLength,
286 UNormalizationMode mode,
287 UErrorCode *pErrorCode);
288
306 U_STABLE UBool U_EXPORT2
307 unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
308 UNormalizationMode mode, int32_t options,
309 UErrorCode *pErrorCode);
310
384 U_STABLE int32_t U_EXPORT2
385 unorm_next(UCharIterator *src,
386 UChar *dest, int32_t destCapacity,
387 UNormalizationMode mode, int32_t options,
388 UBool doNormalize, UBool *pNeededToNormalize,
389 UErrorCode *pErrorCode);
390
417 U_STABLE int32_t U_EXPORT2
418 unorm_previous(UCharIterator *src,
419 UChar *dest, int32_t destCapacity,
420 UNormalizationMode mode, int32_t options,
421 UBool doNormalize, UBool *pNeededToNormalize,
422 UErrorCode *pErrorCode);
423
461 U_STABLE int32_t U_EXPORT2
462 unorm_concatenate(const UChar *left, int32_t leftLength,
463 const UChar *right, int32_t rightLength,
464 UChar *dest, int32_t destCapacity,
465 UNormalizationMode mode, int32_t options,
466 UErrorCode *pErrorCode);
467
468 #endif /* U_HIDE_DEPRECATED_API */
469 #endif /* #if !UCONFIG_NO_NORMALIZATION */
470 #endif
UNORM_NFD
Canonical decomposition.
Definition: unorm.h:141
unorm_quickCheckWithOptions
UNormalizationCheckResult unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength, UNormalizationMode mode, int32_t options, UErrorCode *pErrorCode)
Performing quick check on a string; same as unorm_quickCheck but takes an extra options parameter lik...
UNORM_UNICODE_3_2
Options bit set value to select Unicode 3.2 normalization (except NormalizationCorrections).
Definition: unorm.h:172
UNORM_FCD
"Fast C or D" form.
Definition: unorm.h:151
UNormalizationMode
UNormalizationMode
Constants for normalization modes.
Definition: unorm.h:137
UNORM_NFKC
Compatibility decomposition followed by canonical composition.
Definition: unorm.h:149
UCharIterator
C API for code unit iteration.
Definition: uiter.h:339
unorm_quickCheck
UNormalizationCheckResult unorm_quickCheck(const UChar *source, int32_t sourcelength, UNormalizationMode mode, UErrorCode *status)
Performing quick check on a string, to quickly determine if the string is in a particular normalizati...
unorm_normalize
int32_t unorm_normalize(const UChar *source, int32_t sourceLength, UNormalizationMode mode, int32_t options, UChar *result, int32_t resultLength, UErrorCode *status)
Normalize a string.
unorm2.h
C API: New API for Unicode Normalization.
unorm_isNormalizedWithOptions
UBool unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength, UNormalizationMode mode, int32_t options, UErrorCode *pErrorCode)
Test if a string is in a given normalization form; same as unorm_isNormalized but takes an extra opti...
unorm_isNormalized
UBool unorm_isNormalized(const UChar *src, int32_t srcLength, UNormalizationMode mode, UErrorCode *pErrorCode)
Test if a string is in a given normalization form.
UNORM_DEFAULT
Default normalization.
Definition: unorm.h:147
UNORM_NONE
No decomposition/composition.
Definition: unorm.h:139
uiter.h
C API: Unicode Character Iteration.
unorm_next
int32_t unorm_next(UCharIterator *src, UChar *dest, int32_t destCapacity, UNormalizationMode mode, int32_t options, UBool doNormalize, UBool *pNeededToNormalize, UErrorCode *pErrorCode)
Iterative normalization forward.
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
unorm_concatenate
int32_t unorm_concatenate(const UChar *left, int32_t leftLength, const UChar *right, int32_t rightLength, UChar *dest, int32_t destCapacity, UNormalizationMode mode, int32_t options, UErrorCode *pErrorCode)
Concatenate normalized strings, making sure that the result is normalized as well.
unorm_previous
int32_t unorm_previous(UCharIterator *src, UChar *dest, int32_t destCapacity, UNormalizationMode mode, int32_t options, UBool doNormalize, UBool *pNeededToNormalize, UErrorCode *pErrorCode)
Iterative normalization backward.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
UNORM_NFKD
Compatibility decomposition.
Definition: unorm.h:143
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UNORM_MODE_COUNT
One more than the highest normalization mode constant.
Definition: unorm.h:154
UNormalizationCheckResult
UNormalizationCheckResult
Result values for normalization quick check functions.
Definition: unorm2.h:91
UNORM_NFC
Canonical decomposition followed by canonical composition.
Definition: unorm.h:145
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234