+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
- * Copyright (C) 1999-2008, International Business Machines
+ * Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
#include "unicode/unistr.h"
#include "unicode/uniset.h"
+#include "unicode/utf16.h"
#include "rbt_set.h"
#include "rbt_rule.h"
#include "cmemory.h"
U_CDECL_BEGIN
static void U_CALLCONV _deleteRule(void *rule) {
- delete (U_NAMESPACE_QUALIFIER TransliterationRule *)rule;
+ delete (icu::TransliterationRule *)rule;
}
U_CDECL_END
UnicodeString &target) {
for (int32_t i = 0; i < source.length(); ) {
UChar32 ch = source.char32At(i);
- i += UTF_CHAR_LENGTH(ch);
+ i += U16_LENGTH(ch);
if (ch < 0x09 || (ch > 0x0A && ch < 0x20)|| ch > 0x7E) {
if (ch <= 0xFFFF) {
target += "\\u";
// Fill the precontext and postcontext with the patterns of the rules
// that are masking one another.
-static void maskingError(const U_NAMESPACE_QUALIFIER TransliterationRule& rule1,
- const U_NAMESPACE_QUALIFIER TransliterationRule& rule2,
+static void maskingError(const icu::TransliterationRule& rule1,
+ const icu::TransliterationRule& rule2,
UParseError& parseError) {
- U_NAMESPACE_QUALIFIER UnicodeString r;
+ icu::UnicodeString r;
int32_t len;
parseError.line = parseError.offset = -1;
}
}
// No match or partial match from any rule
- pos.start += UTF_CHAR_LENGTH(text.char32At(pos.start));
+ pos.start += U16_LENGTH(text.char32At(pos.start));
_debugOut("no match", NULL, text, pos);
return TRUE;
}