+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
********************************************************************
* COPYRIGHT:
#include "unicode/unorm.h"
#include "unicode/uobject.h"
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
/**
* Old Unicode normalization API.
* @param mode The normalization mode.
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- Normalizer(const UChar* str, int32_t length, UNormalizationMode mode);
+ Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode);
/**
* Creates a new <code>Normalizer</code> object for iterating over the
* @deprecated ICU 56 Use Normalizer2 instead.
*/
Normalizer(const CharacterIterator& iter, UNormalizationMode mode);
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Copy constructor.
* @deprecated ICU 56 Use Normalizer2 instead.
*/
Normalizer(const Normalizer& copy);
-#endif /* U_HIDE_DEPRECATED_API */
/**
* Destructor
* @param status a UErrorCode
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- void setText(const UChar* newText,
+ void setText(ConstChar16Ptr newText,
int32_t length,
UErrorCode &status);
/**
FilteredNormalizer2*fFilteredNorm2; // owned if not NULL
const Normalizer2 *fNorm2; // not owned; may be equal to fFilteredNorm2
-#ifndef U_HIDE_DEPRECATED_API
- UNormalizationMode fUMode;
-#endif /* U_HIDE_DEPRECATED_API */
+ UNormalizationMode fUMode; // deprecated
int32_t fOptions;
// The input text and our position in it
uint32_t options,
UErrorCode &errorCode) {
// all argument checking is done in unorm_compare
- return unorm_compare(s1.getBuffer(), s1.length(),
- s2.getBuffer(), s2.length(),
+ return unorm_compare(toUCharPtr(s1.getBuffer()), s1.length(),
+ toUCharPtr(s2.getBuffer()), s2.length(),
options,
&errorCode);
}
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
#endif /* #if !UCONFIG_NO_NORMALIZATION */