Check that the given CharSequence is neither null nor of length 0. Note: Will return true for a CharSequence that purely consists of whitespace. StringUtils.hasLength(null) = false StringUtils.hasLength("") = false StringUtils.hasLength(" ") = true StringUtils.hasLeng
(@Nullable CharSequence str)
| 124 | * @see #hasText(String) |
| 125 | */ |
| 126 | public static boolean hasLength(@Nullable CharSequence str) { |
| 127 | return (str != null && str.length() > 0); |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Trim all occurrences of the supplied leading character from the given String. |