#include "unicode/utypes.h"
#if !UCONFIG_NO_TRANSLITERATION
#include "remtrans.h"
static const UChar ID[] = {65, 110, 121, 45, 0x52, 0x65, 0x6D, 0x6F, 0x76, 0x65, 0x00};
U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RemoveTransliterator)
void RemoveTransliterator::registerIDs() {
Transliterator::_registerFactory(::ID, _create, integerToken(0));
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"),
UNICODE_STRING_SIMPLE("Null"), FALSE);
}
Transliterator* RemoveTransliterator::_create(const UnicodeString& ,
Token ) {
return new RemoveTransliterator();
}
RemoveTransliterator::RemoveTransliterator() : Transliterator(::ID, 0) {}
RemoveTransliterator::~RemoveTransliterator() {}
Transliterator* RemoveTransliterator::clone(void) const {
return new RemoveTransliterator();
}
void RemoveTransliterator::handleTransliterate(Replaceable& text, UTransPosition& index,
UBool ) const {
UnicodeString empty;
text.handleReplaceBetween(index.start, index.limit, empty);
int32_t len = index.limit - index.start;
index.contextLimit -= len;
index.limit -= len;
}
U_NAMESPACE_END
#endif