Skip to content

Commit

Permalink
fix checkstyle error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kappaccinoh committed Mar 25, 2024
1 parent d78af10 commit 7969c57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/seedu/address/commons/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ public static boolean containsWordIgnoreCase(String sentence, String word) {
.anyMatch(preppedWord::equalsIgnoreCase);
}

/**
* Checks if the given sentence contains the specified substring, ignoring case.
*
* @param sentence The sentence to search within.
* @param substring The substring to search for.
* @return True if the sentence contains the substring, ignoring case; false otherwise.
* @throws NullPointerException if either the sentence or the substring is null.
* @throws IllegalArgumentException if the substring parameter is empty.
*/
public static boolean containsSubstringIgnoreCase(String sentence, String substring) {
requireNonNull(sentence);
requireNonNull(substring);
Expand Down

0 comments on commit 7969c57

Please sign in to comment.