1 package com.atlassian.user.search.query.match;
2
3 import org.apache.commons.lang.StringUtils;
4
5 /**
6 * Matches if {@link StringUtils#contains} returns true for the two arguments after they have been
7 * converted to lower case. If either argument is null, returns false.
8 */
9 public class ContainsIgnoreCaseMatcher implements Matcher
10 {
11 public boolean matches(String content, String searchTerm)
12 {
13 if (content == null || searchTerm == null)
14 return false;
15 return StringUtils.contains(content.toLowerCase(), searchTerm.toLowerCase());
16 }
17 }