/*
*************************************************************************
* COPYRIGHT:
- * Copyright (c) 1996-2010, International Business Machines Corporation and
+ * Copyright (c) 1996-2012, International Business Machines Corporation and
* others. All Rights Reserved.
*************************************************************************
*/
#include "unicode/schriter.h"
#include "unicode/uchriter.h"
#include "unicode/normlzr.h"
+#include "unicode/utf16.h"
#include "cmemory.h"
#include "normalizer2impl.h"
#include "uprops.h" // for uniset_getUnicode32Instance()
init();
}
-static const UChar _NUL=0;
-
void
Normalizer::init() {
UErrorCode errorCode=U_ZERO_ERROR;
}
UnicodeString & U_EXPORT2
-Normalizer::concatenate(UnicodeString &left, UnicodeString &right,
+Normalizer::concatenate(const UnicodeString &left, const UnicodeString &right,
UnicodeString &result,
UNormalizationMode mode, int32_t options,
UErrorCode &errorCode) {
UChar32 Normalizer::next() {
if(bufferPos<buffer.length() || nextNormalize()) {
UChar32 c=buffer.char32At(bufferPos);
- bufferPos+=UTF_CHAR_LENGTH(c);
+ bufferPos+=U16_LENGTH(c);
return c;
} else {
return DONE;
UChar32 Normalizer::previous() {
if(bufferPos>0 || previousNormalize()) {
UChar32 c=buffer.char32At(bufferPos-1);
- bufferPos-=UTF_CHAR_LENGTH(c);
+ bufferPos-=U16_LENGTH(c);
return c;
} else {
return DONE;