Last active
October 1, 2016 21:53
-
-
Save redcho/fd2b01491ef63d0285c260a7ce427cd2 to your computer and use it in GitHub Desktop.
Find first keyword in message
This file contains 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 static String getKeyword(String msg, ArrayList<String> keywordList){ | |
for(String key : keywordList){ | |
if(msg.toLowerCase().contains(key.toLowerCase())){ | |
return key; | |
} | |
} | |
return ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment