]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/titletrn.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 2001-2007, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Date Name Description
9 * 05/24/01 aliu Creation.
10 **********************************************************************
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_TRANSLITERATION
19 #include "unicode/translit.h"
26 * A transliterator that converts all letters (as defined by
27 * <code>UCharacter.isLetter()</code>) to lower case, except for those
28 * letters preceded by non-letters. The latter are converted to title
29 * case using <code>u_totitle()</code>.
32 class TitlecaseTransliterator
: public CaseMapTransliterator
{
36 * Constructs a transliterator.
37 * @param loc the given locale.
39 TitlecaseTransliterator();
44 virtual ~TitlecaseTransliterator();
49 TitlecaseTransliterator(const TitlecaseTransliterator
&);
53 * @return a copy of the object.
55 virtual TitlecaseTransliterator
* clone() const;
58 * ICU "poor man's RTTI", returns a UClassID for the actual class.
60 virtual UClassID
getDynamicClassID() const;
63 * ICU "poor man's RTTI", returns a UClassID for this class.
65 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID();
70 * Implements {@link Transliterator#handleTransliterate}.
71 * @param text the buffer holding transliterated and
72 * untransliterated text
73 * @param offset the start and limit of the text, the position
74 * of the cursor, and the start and limit of transliteration.
75 * @param incremental if true, assume more text may be coming after
76 * pos.contextLimit. Otherwise, assume the text is complete.
78 virtual void handleTransliterate(Replaceable
& text
, UTransPosition
& offset
,
79 UBool isIncremental
) const;
83 * Assignment operator.
85 TitlecaseTransliterator
& operator=(const TitlecaseTransliterator
&);
90 #endif /* #if !UCONFIG_NO_TRANSLITERATION */