ICU 56.1  56.1
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 {
152 
156 #endif /* U_HIDE_DEPRECATED_API */
157 
165 enum {
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 
238 unorm_quickCheck(const UChar *source, int32_t sourcelength,
239  UNormalizationMode mode,
240  UErrorCode *status);
241 
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
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
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
Canonical decomposition.
Definition: unorm.h:141
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...
Options bit set value to select Unicode 3.2 normalization (except NormalizationCorrections).
Definition: unorm.h:172
"Fast C or D" form.
Definition: unorm.h:151
UNormalizationMode
Constants for normalization modes.
Definition: unorm.h:137
Compatibility decomposition followed by canonical composition.
Definition: unorm.h:149
C API for code unit iteration.
Definition: uiter.h:339
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...
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.
C API: New API for Unicode Normalization.
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...
UBool unorm_isNormalized(const UChar *src, int32_t srcLength, UNormalizationMode mode, UErrorCode *pErrorCode)
Test if a string is in a given normalization form.
Default normalization.
Definition: unorm.h:147
No decomposition/composition.
Definition: unorm.h:139
C API: Unicode Character Iteration.
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.
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
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.
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
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
Compatibility decomposition.
Definition: unorm.h:143
Basic definitions for ICU, for both C and C++ APIs.
One more than the highest normalization mode constant.
Definition: unorm.h:154
UNormalizationCheckResult
Result values for normalization quick check functions.
Definition: unorm2.h:91
Canonical decomposition followed by canonical composition.
Definition: unorm.h:145
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234