Skip to content

Instantly share code, notes, and snippets.

@geektutor
Created May 6, 2020 21:01
Show Gist options
  • Save geektutor/8daf6276c7c93e7bd423257bc6c82719 to your computer and use it in GitHub Desktop.
Save geektutor/8daf6276c7c93e7bd423257bc6c82719 to your computer and use it in GitHub Desktop.
Day 6 Submissions of #30DaysOfCode
void main() {
search('I hope you scorelesss today', 'today');
}
search(String text, String word) {
var literalList = text.split(" ");
if (literalList.contains(word)) {
print("Matched!");
} else {
print("Not Matched!");
}
}
/*
Write a program to search some literals strings in a string.
Sample text: 'I hope you scoreless today.'
Searched words : 'hope', 'today', 'fifteen'
If the string can be found, return/print "Matched!" else return/print "Not Matched!"
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment