private List<StringMatchLocation> endsWith(final String string) {
        if (string == null) {
            return Collections.emptyList();
        }
        final String alteredString = normaliseCaseIfRequired(string);
        if (alteredString.endsWith(pattern)) {
            return Collections.singletonList(new StringMatchLocation(string.length() - pattern.length(),
                    pattern.length()));
        }
        return Collections.emptyList();
    }
Types that will need the case of pattern to be normalised if caseSensitive is true.
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/StringMatcher.java