scuffed-code/icu4c/source/i18n/tolowtrn.cpp
2001-10-08 23:26:58 +00:00

71 lines
1.7 KiB
C++

/*
**********************************************************************
* Copyright (C) 2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* 05/24/01 aliu Creation.
**********************************************************************
*/
#include "unicode/tolowtrn.h"
U_NAMESPACE_BEGIN
const char* LowercaseTransliterator::_ID = "Any-Lower";
/**
* Constructs a transliterator.
*/
LowercaseTransliterator::LowercaseTransliterator(const Locale& theLoc,
UnicodeFilter* adoptedFilter) :
TransformTransliterator(_ID, adoptedFilter),
loc(theLoc) {
}
/**
* Destructor.
*/
LowercaseTransliterator::~LowercaseTransliterator() {}
/**
* Copy constructor.
*/
LowercaseTransliterator::LowercaseTransliterator(const LowercaseTransliterator& o) :
TransformTransliterator(o),
loc(o.loc) {}
/**
* Assignment operator.
*/
LowercaseTransliterator& LowercaseTransliterator::operator=(
const LowercaseTransliterator& o) {
TransformTransliterator::operator=(o);
loc = o.loc;
return *this;
}
/**
* Transliterator API.
*/
Transliterator* LowercaseTransliterator::clone(void) const {
return new LowercaseTransliterator(*this);
}
/**
* TransformTransliterator framework method.
*/
UBool LowercaseTransliterator::hasTransform(UChar32 c) const {
return c != u_tolower(c);
}
/**
* TransformTransliterator framework method.
*/
void LowercaseTransliterator::transform(UnicodeString& s) const {
s.toLower(loc);
}
U_NAMESPACE_END