MCPcopy Create free account
hub / github.com/jOOQ/jOOQ / isBlank

Method isBlank

jOOQ/src/main/java/org/jooq/tools/StringUtils.java:263–274  ·  view source on GitHub ↗

Checks if a String is whitespace, empty ("") or null. StringUtils.isBlank(null) = true StringUtils.isBlank("") = true StringUtils.isBlank(" ") = true StringUtils.isBlank("bob") = false StringUtils.isBlank(" bob ") = false @param str the String to check

(String str)

Source from the content-addressed store, hash-verified

261 * @since 2.0
262 */
263 public static boolean isBlank(String str) {
264 int strLen;
265 if (str == null || (strLen = str.length()) == 0) {
266 return true;
267 }
268 for (int i = 0; i < strLen; i++) {
269 if ((Character.isWhitespace(str.charAt(i)) == false)) {
270 return false;
271 }
272 }
273 return true;
274 }
275
276 // Count matches
277 // -----------------------------------------------------------------------

Callers 15

exportMethod · 0.95
getJavaPackageNameMethod · 0.95
overloadMethod · 0.95
generateMethod · 0.95
generateRecordSetter0Method · 0.95
generatePojo0Method · 0.95
printClassAnnotationsMethod · 0.95
printPackageCommentMethod · 0.95

Calls 1

lengthMethod · 0.65

Tested by

no test coverage detected