From 7969c572ce1478d67264fb253893ed526e0ca6b5 Mon Sep 17 00:00:00 2001 From: Kappaccinoh Date: Tue, 26 Mar 2024 01:11:54 +0800 Subject: [PATCH] fix checkstyle error --- src/main/java/seedu/address/commons/util/StringUtil.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/seedu/address/commons/util/StringUtil.java b/src/main/java/seedu/address/commons/util/StringUtil.java index 899f93687c2..a5ab841bdaa 100644 --- a/src/main/java/seedu/address/commons/util/StringUtil.java +++ b/src/main/java/seedu/address/commons/util/StringUtil.java @@ -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);