Created
July 21, 2016 20:22
-
-
Save nhojpatrick/d41be832800567d9385b2ca9d6bb6063 to your computer and use it in GitHub Desktop.
xyzThere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean xyzThere(final String input) { | |
if (input == null | |
|| "".equals(input.trim())) { | |
return false; | |
} | |
if (input.contains(".xyz") | |
&& input.contains("xyz")) { | |
return false; | |
} else if (input.contains(".xyz")) { | |
return false; | |
} | |
return input.contains("xyz"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment