]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/remtrans.cpp
2 **********************************************************************
3 * Copyright (c) 2001, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Date Name Description
7 * 04/02/2001 aliu Creation.
8 **********************************************************************
11 #include "unicode/utypes.h"
13 #if !UCONFIG_NO_TRANSLITERATION
17 static const UChar ID
[] = {65, 110, 121, 45, 0x52, 0x65, 0x6D, 0x6F, 0x76, 0x65, 0x00}; /* "Any-Remove" */
21 const char RemoveTransliterator::fgClassID
=0;
24 * System registration hook.
26 void RemoveTransliterator::registerIDs() {
28 Transliterator::_registerFactory(::ID
, _create
, integerToken(0));
30 Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"),
31 UNICODE_STRING_SIMPLE("Null"), FALSE
);
37 Transliterator
* RemoveTransliterator::_create(const UnicodeString
& ID
,
39 return new RemoveTransliterator();
42 RemoveTransliterator::RemoveTransliterator() : Transliterator(::ID
, 0) {}
44 RemoveTransliterator::~RemoveTransliterator() {}
46 Transliterator
* RemoveTransliterator::clone(void) const {
47 return new RemoveTransliterator();
50 void RemoveTransliterator::handleTransliterate(Replaceable
& text
, UTransPosition
& index
,
51 UBool
/*isIncremental*/) const {
52 // Our caller (filteredTransliterate) has already narrowed us
53 // to an unfiltered run. Delete it.
55 text
.handleReplaceBetween(index
.start
, index
.limit
, empty
);
56 int32_t len
= index
.limit
- index
.start
;
57 index
.contextLimit
-= len
;
62 #endif /* #if !UCONFIG_NO_TRANSLITERATION */