|Modifier and Type||Method and Description|
Titlecases a string and optionally records edits (see
Returns an instance that behaves like this one but does not adjust the titlecasing indexes from BreakIterator::next() indexes; titlecases exactly the characters at breaks from the iterator.
Returns an instance that behaves like this one but does not lowercase non-initial parts of words when titlecasing.
Returns an instance that behaves like this one but omits unchanged text when case-mapping with
public CaseMap.Title omitUnchangedText()
public CaseMap.Title noLowercase()
By default, titlecasing will titlecase the first cased character of a word and lowercase all other characters. With this option, the other characters will not be modified.
public CaseMap.Title noBreakAdjustment()
By default, titlecasing will take each break iterator index, adjust it by looking for the next cased character, and titlecase that one. Other characters are lowercased.
This follows Unicode 4 & 5 section 3.13 Default Case Operations: R3 toTitlecase(X): Find the word boundaries based on Unicode Standard Annex #29, "Text Boundaries." Between each pair of word boundaries, find the first cased character F. If F exists, map F to default_title(F); then map each subsequent character C to default_lower(C).
public <A extends Appendable> A apply(Locale locale, BreakIterator iter, CharSequence src, A dest, Edits edits)
omitUnchangedText()). Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
locale- The locale ID. Can be null for
iter- A break iterator to find the first characters of words that are to be titlecased. It is set to the source string (setText()) and used one or more times for iteration (first() and next()). If null, then a word break iterator for the locale is used (or something equivalent).
src- The original string.
dest- A buffer for the result string. Must not be null.
edits- Records edits for index mapping, working with styled text, and getting only changes (if any). This function calls edits.reset() first. edits can be null.
UCharacter.toTitleCase(Locale, String, BreakIterator, int)
Copyright © 2016 Unicode, Inc. and others.