public static final class Norm2AllModes.NoopNormalizer2 extends Normalizer2
Normalizer2.Mode| Constructor and Description |
|---|
NoopNormalizer2() |
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
append(StringBuilder first,
CharSequence second)
Appends the second string to the first string
(merging them at the boundary) and returns the first string.
|
String |
getDecomposition(int c)
Gets the decomposition mapping of c.
|
boolean |
hasBoundaryAfter(int c)
Tests if the character always has a normalization boundary after it,
regardless of context.
|
boolean |
hasBoundaryBefore(int c)
Tests if the character always has a normalization boundary before it,
regardless of context.
|
boolean |
isInert(int c)
Tests if the character is normalization-inert.
|
boolean |
isNormalized(CharSequence s)
Tests if the string is normalized.
|
Appendable |
normalize(CharSequence src,
Appendable dest)
Writes the normalized form of the source string to the destination Appendable
and returns the destination Appendable.
|
StringBuilder |
normalize(CharSequence src,
StringBuilder dest)
Writes the normalized form of the source string to the destination string
(replacing its contents) and returns the destination string.
|
StringBuilder |
normalizeSecondAndAppend(StringBuilder first,
CharSequence second)
Appends the normalized form of the second string to the first string
(merging them at the boundary) and returns the first string.
|
Normalizer.QuickCheckResult |
quickCheck(CharSequence s)
Tests if the string is normalized.
|
int |
spanQuickCheckYes(CharSequence s)
Returns the end of the normalized substring of the input string.
|
composePair, getCombiningClass, getInstance, getNFCInstance, getNFDInstance, getNFKCCasefoldInstance, getNFKCInstance, getNFKDInstance, getRawDecomposition, normalizepublic StringBuilder normalize(CharSequence src, StringBuilder dest)
Normalizer2normalize in class Normalizer2src - source stringdest - destination string; its contents is replaced with normalized srcpublic Appendable normalize(CharSequence src, Appendable dest)
Normalizer2Any IOException is wrapped into a ICUUncheckedIOException.
normalize in class Normalizer2src - source stringdest - destination Appendable; gets normalized src appendedpublic StringBuilder normalizeSecondAndAppend(StringBuilder first, CharSequence second)
Normalizer2normalizeSecondAndAppend in class Normalizer2first - string, should be normalizedsecond - string, will be normalizedpublic StringBuilder append(StringBuilder first, CharSequence second)
Normalizer2append in class Normalizer2first - string, should be normalizedsecond - string, should be normalizedpublic String getDecomposition(int c)
Normalizer2getDecomposition in class Normalizer2c - code pointpublic boolean isNormalized(CharSequence s)
Normalizer2isNormalized in class Normalizer2s - input stringpublic Normalizer.QuickCheckResult quickCheck(CharSequence s)
Normalizer2quickCheck in class Normalizer2s - input stringpublic int spanQuickCheckYes(CharSequence s)
Normalizer2end=spanQuickCheckYes(s);
the substring s.subSequence(0, end)
will pass the quick check with a "yes" result.
The returned end index is usually one or more characters before the "no" or "maybe" character: The end index is at a normalization boundary. (See the class documentation for more about normalization boundaries.)
When the goal is a normalized string and most input strings are expected to be normalized already, then call this method, and if it returns a prefix shorter than the input string, copy that prefix and use normalizeSecondAndAppend() for the remainder.
spanQuickCheckYes in class Normalizer2s - input stringpublic boolean hasBoundaryBefore(int c)
Normalizer2hasBoundaryBefore in class Normalizer2c - character to testpublic boolean hasBoundaryAfter(int c)
Normalizer2Note that this operation may be significantly slower than hasBoundaryBefore().
hasBoundaryAfter in class Normalizer2c - character to testpublic boolean isInert(int c)
Normalizer2Note that this operation may be significantly slower than hasBoundaryBefore().
isInert in class Normalizer2c - character to test