/** * Checks for identical match * @param start offset of possible match * @param end offset of possible match * @return TRUE if identical match is found */ private boolean checkIdentical(int start, int end) { if (strength_ != Collator.IDENTICAL) { return true; } // Note: We could use Normalizer::compare() or similar, but for short strings // which may not be in FCD it might be faster to just NFD them. String textstr = getString(targetText, start, end - start); if (Normalizer.quickCheck(textstr, Normalizer.NFD, 0) == Normalizer.NO) { textstr = Normalizer.decompose(textstr, false); } String patternstr = pattern_.text_; if (Normalizer.quickCheck(patternstr, Normalizer.NFD, 0) == Normalizer.NO) { patternstr = Normalizer.decompose(patternstr, false); } return textstr.equals(patternstr); }