Skip to content

Commit f85c9c7

Browse files
committed
Add isNullOrEmpty() utility method to StringUtils
1 parent a545232 commit f85c9c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/io/github/intisy/utils/core/StringUtils.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,14 @@ public static String toTitleCase(String input) {
227227

228228
return titleCase.toString().trim();
229229
}
230+
231+
/**
232+
* Checks if a string is null or empty.
233+
*
234+
* @param str the string to check
235+
* @return true if the string is null or empty, false otherwise
236+
*/
237+
public static boolean isNullOrEmpty(String str) {
238+
return str == null || str.isEmpty();
239+
}
230240
}

0 commit comments

Comments
 (0)