Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static boolean present(String title, String book) {
- int i = 0, j = title.length();
- String sub;
- while (j <= book.length()) {
- sub = book.toLowerCase().substring(i, j);
- if (title.toLowerCase().equals(sub)) {
- return true;
- }
- i++;
- j++;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement