boolean (char charInPattern, char charInText) { boolean sameChar = charInPattern == charInText; if (!sameChar && !myCaseSensitive) { return Strings.charsEqualIgnoreCase(charInPattern, charInText); } return sameChar; }