From 3f4c4f49abccc2b4172c6d9d04697115ab6500eb Mon Sep 17 00:00:00 2001
From: NoctisSolvane
+ * Whitespace is determined by {@link Character#isWhitespace(char)}.
+ *
+ * Examples:
+ *
- * StringUtils.isBlank(null) = true
- * StringUtils.isBlank("") = true
- * StringUtils.isBlank(" ") = true
- * StringUtils.isBlank("bob") = false
- * StringUtils.isBlank(" bob ") = false
- *
- *
- * @param cs the CharSequence to check, may be null.
- * @return {@code true} if the CharSequence is null, empty or whitespace only.
- * @since 2.0
- * @since 3.0 Changed signature from isBlank(String) to isBlank(CharSequence)
- */
+ * Checks if a CharSequence is empty (""), null, or consists only of whitespace characters.
+ *
+ * StringUtils.isBlank(null) = true
+ * StringUtils.isBlank("") = true
+ * StringUtils.isBlank(" ") = true
+ * StringUtils.isBlank("\t\n\r") = true
+ * StringUtils.isBlank("bob") = false
+ * StringUtils.isBlank(" bob ") = false
+ *
+ *
+ * NOTE: This differs from {@link #isEmpty(CharSequence)} which does not check for whitespace. + *
+ * + * @param cs the CharSequence to check, may be null + * @return {@code true} if the CharSequence is empty, null or whitespace only + * @since 3.0 + */ public static boolean isBlank(final CharSequence cs) { final int strLen = length(cs); for (int i = 0; i < strLen; i++) { From 13507ea0c88ffad46f123d1ba57ec7e660cfce61 Mon Sep 17 00:00:00 2001 From: NoctisSolvane- * Whitespace is determined by {@link Character#isWhitespace(char)}. - *
- *- * Examples: - *
- * StringUtils.isBlank(null) = true
- * StringUtils.isBlank("") = true
- * StringUtils.isBlank(" ") = true
- * StringUtils.isBlank("\t\n\r") = true
- * StringUtils.isBlank("bob") = false
- * StringUtils.isBlank(" bob ") = false
- *
- *
- * - * NOTE: This differs from {@link #isEmpty(CharSequence)} which does not check for whitespace. - *
- * - * @param cs the CharSequence to check, may be null - * @return {@code true} if the CharSequence is empty, null or whitespace only - */ + * Checks if a CharSequence is empty(""), null or whitespace only. + *+ * Whitespace is determined by {@link Charachter#isWhiteSpace(char)} + *
+ * + * @param cs the CharSequence to check, may be null + * @return {@code true} if the CharSequence is empty, null or whitespace only + */ public static boolean isBlank(final CharSequence cs) { final int strLen = length(cs); for (int i = 0; i < strLen; i++) {