jpayne@69: // © 2016 and later: Unicode, Inc. and others.
jpayne@69: // License & terms of use: http://www.unicode.org/copyright.html
jpayne@69: /*
jpayne@69: *******************************************************************************
jpayne@69: * Copyright (c) 1996-2016, International Business Machines Corporation
jpayne@69: * and others. All Rights Reserved.
jpayne@69: *******************************************************************************
jpayne@69: * File unorm.h
jpayne@69: *
jpayne@69: * Created by: Vladimir Weinstein 12052000
jpayne@69: *
jpayne@69: * Modification history :
jpayne@69: *
jpayne@69: * Date Name Description
jpayne@69: * 02/01/01 synwee Added normalization quickcheck enum and method.
jpayne@69: */
jpayne@69: #ifndef UNORM_H
jpayne@69: #define UNORM_H
jpayne@69:
jpayne@69: #include "unicode/utypes.h"
jpayne@69:
jpayne@69: #if !UCONFIG_NO_NORMALIZATION
jpayne@69:
jpayne@69: #include "unicode/uiter.h"
jpayne@69: #include "unicode/unorm2.h"
jpayne@69:
jpayne@69: /**
jpayne@69: * \file
jpayne@69: * \brief C API: Unicode Normalization
jpayne@69: *
jpayne@69: * Old Unicode normalization API.
jpayne@69: *
jpayne@69: * This API has been replaced by the unorm2.h API and is only available
jpayne@69: * for backward compatibility. The functions here simply delegate to the
jpayne@69: * unorm2.h functions, for example unorm2_getInstance() and unorm2_normalize().
jpayne@69: * There is one exception: The new API does not provide a replacement for unorm_compare().
jpayne@69: * Its declaration has been moved to unorm2.h.
jpayne@69: *
jpayne@69: * unorm_normalize
transforms Unicode text into an equivalent composed or
jpayne@69: * decomposed form, allowing for easier sorting and searching of text.
jpayne@69: * unorm_normalize
supports the standard normalization forms described in
jpayne@69: *
jpayne@69: * Unicode Standard Annex #15: Unicode Normalization Forms.
jpayne@69: *
jpayne@69: * Characters with accents or other adornments can be encoded in
jpayne@69: * several different ways in Unicode. For example, take the character A-acute.
jpayne@69: * In Unicode, this can be encoded as a single character (the
jpayne@69: * "composed" form):
jpayne@69: *
jpayne@69: * \code
jpayne@69: * 00C1 LATIN CAPITAL LETTER A WITH ACUTE
jpayne@69: * \endcode
jpayne@69: *
jpayne@69: * or as two separate characters (the "decomposed" form):
jpayne@69: *
jpayne@69: * \code
jpayne@69: * 0041 LATIN CAPITAL LETTER A
jpayne@69: * 0301 COMBINING ACUTE ACCENT
jpayne@69: * \endcode
jpayne@69: *
jpayne@69: * To a user of your program, however, both of these sequences should be
jpayne@69: * treated as the same "user-level" character "A with acute accent". When you are searching or
jpayne@69: * comparing text, you must ensure that these two sequences are treated
jpayne@69: * equivalently. In addition, you must handle characters with more than one
jpayne@69: * accent. Sometimes the order of a character's combining accents is
jpayne@69: * significant, while in other cases accent sequences in different orders are
jpayne@69: * really equivalent.
jpayne@69: *
jpayne@69: * Similarly, the string "ffi" can be encoded as three separate letters:
jpayne@69: *
jpayne@69: * \code
jpayne@69: * 0066 LATIN SMALL LETTER F
jpayne@69: * 0066 LATIN SMALL LETTER F
jpayne@69: * 0069 LATIN SMALL LETTER I
jpayne@69: * \endcode
jpayne@69: *
jpayne@69: * or as the single character
jpayne@69: *
jpayne@69: * \code
jpayne@69: * FB03 LATIN SMALL LIGATURE FFI
jpayne@69: * \endcode
jpayne@69: *
jpayne@69: * The ffi ligature is not a distinct semantic character, and strictly speaking
jpayne@69: * it shouldn't be in Unicode at all, but it was included for compatibility
jpayne@69: * with existing character sets that already provided it. The Unicode standard
jpayne@69: * identifies such characters by giving them "compatibility" decompositions
jpayne@69: * into the corresponding semantic characters. When sorting and searching, you
jpayne@69: * will often want to use these mappings.
jpayne@69: *
jpayne@69: * unorm_normalize
helps solve these problems by transforming text into the
jpayne@69: * canonical composed and decomposed forms as shown in the first example above.
jpayne@69: * In addition, you can have it perform compatibility decompositions so that
jpayne@69: * you can treat compatibility characters the same as their equivalents.
jpayne@69: * Finally, unorm_normalize
rearranges accents into the proper canonical
jpayne@69: * order, so that you do not have to worry about accent rearrangement on your
jpayne@69: * own.
jpayne@69: *
jpayne@69: * Form FCD, "Fast C or D", is also designed for collation.
jpayne@69: * It allows to work on strings that are not necessarily normalized
jpayne@69: * with an algorithm (like in collation) that works under "canonical closure", i.e., it treats precomposed
jpayne@69: * characters and their decomposed equivalents the same.
jpayne@69: *
jpayne@69: * It is not a normalization form because it does not provide for uniqueness of representation. Multiple strings
jpayne@69: * may be canonically equivalent (their NFDs are identical) and may all conform to FCD without being identical
jpayne@69: * themselves.
jpayne@69: *
jpayne@69: * The form is defined such that the "raw decomposition", the recursive canonical decomposition of each character,
jpayne@69: * results in a string that is canonically ordered. This means that precomposed characters are allowed for as long
jpayne@69: * as their decompositions do not need canonical reordering.
jpayne@69: *
jpayne@69: * Its advantage for a process like collation is that all NFD and most NFC texts - and many unnormalized texts -
jpayne@69: * already conform to FCD and do not need to be normalized (NFD) for such a process. The FCD quick check will
jpayne@69: * return UNORM_YES for most strings in practice.
jpayne@69: *
jpayne@69: * unorm_normalize(UNORM_FCD) may be implemented with UNORM_NFD.
jpayne@69: *
jpayne@69: * For more details on FCD see the collation design document:
jpayne@69: * http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm
jpayne@69: *
jpayne@69: * ICU collation performs either NFD or FCD normalization automatically if normalization
jpayne@69: * is turned on for the collator object.
jpayne@69: * Beyond collation and string search, normalized strings may be useful for string equivalence comparisons,
jpayne@69: * transliteration/transcription, unique representations, etc.
jpayne@69: *
jpayne@69: * The W3C generally recommends to exchange texts in NFC.
jpayne@69: * Note also that most legacy character encodings use only precomposed forms and often do not
jpayne@69: * encode any combining marks by themselves. For conversion to such character encodings the
jpayne@69: * Unicode text needs to be normalized to NFC.
jpayne@69: * For more usage examples, see the Unicode Standard Annex.
jpayne@69: */
jpayne@69:
jpayne@69: // Do not conditionalize the following enum with #ifndef U_HIDE_DEPRECATED_API,
jpayne@69: // it is needed for layout of Normalizer object.
jpayne@69: #ifndef U_FORCE_HIDE_DEPRECATED_API
jpayne@69:
jpayne@69: /**
jpayne@69: * Constants for normalization modes.
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: typedef enum {
jpayne@69: /** No decomposition/composition. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_NONE = 1,
jpayne@69: /** Canonical decomposition. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_NFD = 2,
jpayne@69: /** Compatibility decomposition. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_NFKD = 3,
jpayne@69: /** Canonical decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_NFC = 4,
jpayne@69: /** Default normalization. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_DEFAULT = UNORM_NFC,
jpayne@69: /** Compatibility decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_NFKC =5,
jpayne@69: /** "Fast C or D" form. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_FCD = 6,
jpayne@69:
jpayne@69: /** One more than the highest normalization mode constant. @deprecated ICU 56 Use unorm2.h instead. */
jpayne@69: UNORM_MODE_COUNT
jpayne@69: } UNormalizationMode;
jpayne@69:
jpayne@69: #endif // U_FORCE_HIDE_DEPRECATED_API
jpayne@69:
jpayne@69: #ifndef U_HIDE_DEPRECATED_API
jpayne@69:
jpayne@69: /**
jpayne@69: * Constants for options flags for normalization.
jpayne@69: * Use 0 for default options,
jpayne@69: * including normalization according to the Unicode version
jpayne@69: * that is currently supported by ICU (see u_getUnicodeVersion).
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: enum {
jpayne@69: /**
jpayne@69: * Options bit set value to select Unicode 3.2 normalization
jpayne@69: * (except NormalizationCorrections).
jpayne@69: * At most one Unicode version can be selected at a time.
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: UNORM_UNICODE_3_2=0x20
jpayne@69: };
jpayne@69:
jpayne@69: /**
jpayne@69: * Lowest-order bit number of unorm_compare() options bits corresponding to
jpayne@69: * normalization options bits.
jpayne@69: *
jpayne@69: * The options parameter for unorm_compare() uses most bits for
jpayne@69: * itself and for various comparison and folding flags.
jpayne@69: * The most significant bits, however, are shifted down and passed on
jpayne@69: * to the normalization implementation.
jpayne@69: * (That is, from unorm_compare(..., options, ...),
jpayne@69: * options>>UNORM_COMPARE_NORM_OPTIONS_SHIFT will be passed on to the
jpayne@69: * internal normalization functions.)
jpayne@69: *
jpayne@69: * @see unorm_compare
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20
jpayne@69:
jpayne@69: /**
jpayne@69: * Normalize a string.
jpayne@69: * The string will be normalized according the specified normalization mode
jpayne@69: * and options.
jpayne@69: * The source and result buffers must not be the same, nor overlap.
jpayne@69: *
jpayne@69: * @param source The string to normalize.
jpayne@69: * @param sourceLength The length of source, or -1 if NUL-terminated.
jpayne@69: * @param mode The normalization mode; one of UNORM_NONE,
jpayne@69: * UNORM_NFD, UNORM_NFC, UNORM_NFKC, UNORM_NFKD, UNORM_DEFAULT.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param result A pointer to a buffer to receive the result string.
jpayne@69: * The result string is NUL-terminated if possible.
jpayne@69: * @param resultLength The maximum size of result.
jpayne@69: * @param status A pointer to a UErrorCode to receive any errors.
jpayne@69: * @return The total buffer size needed; if greater than resultLength,
jpayne@69: * the output was truncated, and the error code is set to U_BUFFER_OVERFLOW_ERROR.
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED int32_t U_EXPORT2
jpayne@69: unorm_normalize(const UChar *source, int32_t sourceLength,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UChar *result, int32_t resultLength,
jpayne@69: UErrorCode *status);
jpayne@69:
jpayne@69: /**
jpayne@69: * Performing quick check on a string, to quickly determine if the string is
jpayne@69: * in a particular normalization format.
jpayne@69: * Three types of result can be returned UNORM_YES, UNORM_NO or
jpayne@69: * UNORM_MAYBE. Result UNORM_YES indicates that the argument
jpayne@69: * string is in the desired normalized format, UNORM_NO determines that
jpayne@69: * argument string is not in the desired normalized format. A
jpayne@69: * UNORM_MAYBE result indicates that a more thorough check is required,
jpayne@69: * the user may have to put the string in its normalized form and compare the
jpayne@69: * results.
jpayne@69: *
jpayne@69: * @param source string for determining if it is in a normalized format
jpayne@69: * @param sourcelength length of source to test, or -1 if NUL-terminated
jpayne@69: * @param mode which normalization form to test for
jpayne@69: * @param status a pointer to a UErrorCode to receive any errors
jpayne@69: * @return UNORM_YES, UNORM_NO or UNORM_MAYBE
jpayne@69: *
jpayne@69: * @see unorm_isNormalized
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED UNormalizationCheckResult U_EXPORT2
jpayne@69: unorm_quickCheck(const UChar *source, int32_t sourcelength,
jpayne@69: UNormalizationMode mode,
jpayne@69: UErrorCode *status);
jpayne@69:
jpayne@69: /**
jpayne@69: * Performing quick check on a string; same as unorm_quickCheck but
jpayne@69: * takes an extra options parameter like most normalization functions.
jpayne@69: *
jpayne@69: * @param src String that is to be tested if it is in a normalization format.
jpayne@69: * @param srcLength Length of source to test, or -1 if NUL-terminated.
jpayne@69: * @param mode Which normalization form to test for.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return UNORM_YES, UNORM_NO or UNORM_MAYBE
jpayne@69: *
jpayne@69: * @see unorm_quickCheck
jpayne@69: * @see unorm_isNormalized
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED UNormalizationCheckResult U_EXPORT2
jpayne@69: unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: /**
jpayne@69: * Test if a string is in a given normalization form.
jpayne@69: * This is semantically equivalent to source.equals(normalize(source, mode)) .
jpayne@69: *
jpayne@69: * Unlike unorm_quickCheck(), this function returns a definitive result,
jpayne@69: * never a "maybe".
jpayne@69: * For NFD, NFKD, and FCD, both functions work exactly the same.
jpayne@69: * For NFC and NFKC where quickCheck may return "maybe", this function will
jpayne@69: * perform further tests to arrive at a TRUE/FALSE result.
jpayne@69: *
jpayne@69: * @param src String that is to be tested if it is in a normalization format.
jpayne@69: * @param srcLength Length of source to test, or -1 if NUL-terminated.
jpayne@69: * @param mode Which normalization form to test for.
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return Boolean value indicating whether the source string is in the
jpayne@69: * "mode" normalization form.
jpayne@69: *
jpayne@69: * @see unorm_quickCheck
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED UBool U_EXPORT2
jpayne@69: unorm_isNormalized(const UChar *src, int32_t srcLength,
jpayne@69: UNormalizationMode mode,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: /**
jpayne@69: * Test if a string is in a given normalization form; same as unorm_isNormalized but
jpayne@69: * takes an extra options parameter like most normalization functions.
jpayne@69: *
jpayne@69: * @param src String that is to be tested if it is in a normalization format.
jpayne@69: * @param srcLength Length of source to test, or -1 if NUL-terminated.
jpayne@69: * @param mode Which normalization form to test for.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return Boolean value indicating whether the source string is in the
jpayne@69: * "mode/options" normalization form.
jpayne@69: *
jpayne@69: * @see unorm_quickCheck
jpayne@69: * @see unorm_isNormalized
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED UBool U_EXPORT2
jpayne@69: unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: /**
jpayne@69: * Iterative normalization forward.
jpayne@69: * This function (together with unorm_previous) is somewhat
jpayne@69: * similar to the C++ Normalizer class (see its non-static functions).
jpayne@69: *
jpayne@69: * Iterative normalization is useful when only a small portion of a longer
jpayne@69: * string/text needs to be processed.
jpayne@69: *
jpayne@69: * For example, the likelihood may be high that processing the first 10% of some
jpayne@69: * text will be sufficient to find certain data.
jpayne@69: * Another example: When one wants to concatenate two normalized strings and get a
jpayne@69: * normalized result, it is much more efficient to normalize just a small part of
jpayne@69: * the result around the concatenation place instead of re-normalizing everything.
jpayne@69: *
jpayne@69: * The input text is an instance of the C character iteration API UCharIterator.
jpayne@69: * It may wrap around a simple string, a CharacterIterator, a Replaceable, or any
jpayne@69: * other kind of text object.
jpayne@69: *
jpayne@69: * If a buffer overflow occurs, then the caller needs to reset the iterator to the
jpayne@69: * old index and call the function again with a larger buffer - if the caller cares
jpayne@69: * for the actual output.
jpayne@69: * Regardless of the output buffer, the iterator will always be moved to the next
jpayne@69: * normalization boundary.
jpayne@69: *
jpayne@69: * This function (like unorm_previous) serves two purposes:
jpayne@69: *
jpayne@69: * 1) To find the next boundary so that the normalization of the part of the text
jpayne@69: * from the current position to that boundary does not affect and is not affected
jpayne@69: * by the part of the text beyond that boundary.
jpayne@69: *
jpayne@69: * 2) To normalize the text up to the boundary.
jpayne@69: *
jpayne@69: * The second step is optional, per the doNormalize parameter.
jpayne@69: * It is omitted for operations like string concatenation, where the two adjacent
jpayne@69: * string ends need to be normalized together.
jpayne@69: * In such a case, the output buffer will just contain a copy of the text up to the
jpayne@69: * boundary.
jpayne@69: *
jpayne@69: * pNeededToNormalize is an output-only parameter. Its output value is only defined
jpayne@69: * if normalization was requested (doNormalize) and successful (especially, no
jpayne@69: * buffer overflow).
jpayne@69: * It is useful for operations like a normalizing transliterator, where one would
jpayne@69: * not want to replace a piece of text if it is not modified.
jpayne@69: *
jpayne@69: * If doNormalize==TRUE and pNeededToNormalize!=NULL then *pNeeded... is set TRUE
jpayne@69: * if the normalization was necessary.
jpayne@69: *
jpayne@69: * If doNormalize==FALSE then *pNeededToNormalize will be set to FALSE.
jpayne@69: *
jpayne@69: * If the buffer overflows, then *pNeededToNormalize will be undefined;
jpayne@69: * essentially, whenever U_FAILURE is true (like in buffer overflows), this result
jpayne@69: * will be undefined.
jpayne@69: *
jpayne@69: * @param src The input text in the form of a C character iterator.
jpayne@69: * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting.
jpayne@69: * @param destCapacity The number of UChars that fit into dest.
jpayne@69: * @param mode The normalization mode.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param doNormalize Indicates if the source text up to the next boundary
jpayne@69: * is to be normalized (TRUE) or just copied (FALSE).
jpayne@69: * @param pNeededToNormalize Output flag indicating if the normalization resulted in
jpayne@69: * different text from the input.
jpayne@69: * Not defined if an error occurs including buffer overflow.
jpayne@69: * Always FALSE if !doNormalize.
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return Length of output (number of UChars) when successful or buffer overflow.
jpayne@69: *
jpayne@69: * @see unorm_previous
jpayne@69: * @see unorm_normalize
jpayne@69: *
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED int32_t U_EXPORT2
jpayne@69: unorm_next(UCharIterator *src,
jpayne@69: UChar *dest, int32_t destCapacity,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UBool doNormalize, UBool *pNeededToNormalize,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: /**
jpayne@69: * Iterative normalization backward.
jpayne@69: * This function (together with unorm_next) is somewhat
jpayne@69: * similar to the C++ Normalizer class (see its non-static functions).
jpayne@69: * For all details see unorm_next.
jpayne@69: *
jpayne@69: * @param src The input text in the form of a C character iterator.
jpayne@69: * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting.
jpayne@69: * @param destCapacity The number of UChars that fit into dest.
jpayne@69: * @param mode The normalization mode.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param doNormalize Indicates if the source text up to the next boundary
jpayne@69: * is to be normalized (TRUE) or just copied (FALSE).
jpayne@69: * @param pNeededToNormalize Output flag indicating if the normalization resulted in
jpayne@69: * different text from the input.
jpayne@69: * Not defined if an error occurs including buffer overflow.
jpayne@69: * Always FALSE if !doNormalize.
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return Length of output (number of UChars) when successful or buffer overflow.
jpayne@69: *
jpayne@69: * @see unorm_next
jpayne@69: * @see unorm_normalize
jpayne@69: *
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED int32_t U_EXPORT2
jpayne@69: unorm_previous(UCharIterator *src,
jpayne@69: UChar *dest, int32_t destCapacity,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UBool doNormalize, UBool *pNeededToNormalize,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: /**
jpayne@69: * Concatenate normalized strings, making sure that the result is normalized as well.
jpayne@69: *
jpayne@69: * If both the left and the right strings are in
jpayne@69: * the normalization form according to "mode/options",
jpayne@69: * then the result will be
jpayne@69: *
jpayne@69: * \code
jpayne@69: * dest=normalize(left+right, mode, options)
jpayne@69: * \endcode
jpayne@69: *
jpayne@69: * With the input strings already being normalized,
jpayne@69: * this function will use unorm_next() and unorm_previous()
jpayne@69: * to find the adjacent end pieces of the input strings.
jpayne@69: * Only the concatenation of these end pieces will be normalized and
jpayne@69: * then concatenated with the remaining parts of the input strings.
jpayne@69: *
jpayne@69: * It is allowed to have dest==left to avoid copying the entire left string.
jpayne@69: *
jpayne@69: * @param left Left source string, may be same as dest.
jpayne@69: * @param leftLength Length of left source string, or -1 if NUL-terminated.
jpayne@69: * @param right Right source string. Must not be the same as dest, nor overlap.
jpayne@69: * @param rightLength Length of right source string, or -1 if NUL-terminated.
jpayne@69: * @param dest The output buffer; can be NULL if destCapacity==0 for pure preflighting.
jpayne@69: * @param destCapacity The number of UChars that fit into dest.
jpayne@69: * @param mode The normalization mode.
jpayne@69: * @param options The normalization options, ORed together (0 for no options).
jpayne@69: * @param pErrorCode ICU error code in/out parameter.
jpayne@69: * Must fulfill U_SUCCESS before the function call.
jpayne@69: * @return Length of output (number of UChars) when successful or buffer overflow.
jpayne@69: *
jpayne@69: * @see unorm_normalize
jpayne@69: * @see unorm_next
jpayne@69: * @see unorm_previous
jpayne@69: *
jpayne@69: * @deprecated ICU 56 Use unorm2.h instead.
jpayne@69: */
jpayne@69: U_DEPRECATED int32_t U_EXPORT2
jpayne@69: unorm_concatenate(const UChar *left, int32_t leftLength,
jpayne@69: const UChar *right, int32_t rightLength,
jpayne@69: UChar *dest, int32_t destCapacity,
jpayne@69: UNormalizationMode mode, int32_t options,
jpayne@69: UErrorCode *pErrorCode);
jpayne@69:
jpayne@69: #endif /* U_HIDE_DEPRECATED_API */
jpayne@69: #endif /* #if !UCONFIG_NO_NORMALIZATION */
jpayne@69: #endif