StringUtils.isNotBlank is convenient for empty judgment and null judgment in java

I feel that the writing style is different depending on the person, so I thought I wanted to unify it. Returns false when the String is empty, just spaces, or null.

StringUtils.isNotBlank(String str)

 StringUtils.isNotBlank(null)      = false
 StringUtils.isNotBlank("")        = false
 StringUtils.isNotBlank(" ")       = false
 StringUtils.isNotBlank("bob")     = true
 StringUtils.isNotBlank("  bob  ") = true

There are many other useful things. https://www.sejuku.net/blog/19323 ↑ Although it is summarized by Samurai Blog, I definitely want to actively look at the official as an engineer's edge. ↓ Official https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html

Recommended Posts

StringUtils.isNotBlank is convenient for empty judgment and null judgment in java
Java Two Lists are ignored in order, null is ignored, and duplicates are ignored.
This and that for editing ini in Java. : inieditor-java
Store in Java 2D map and turn with for statement
[For beginners] Explanation of classes, instances, and statics in Java
[Java] Make variables in extended for statement and for Each statement immutable
Difference between element 0, null and empty string (check in list)
Same judgment / equal value judgment / comparison / order in Swift and Java
Tips for using Salesforce SOAP and Bulk API in Java
Java while and for statements
Is short-circuit evaluation really fast? Difference between && and & in Java
[Note] Java: Is it necessary to override equals for equality judgment?
Do Scala Option.or Null in Java
AWS SDK for Java 1.11.x and 2.x
Rock-paper-scissors game for beginners in Java
Java for beginners, expressions and operators 1
Encoding and Decoding example in Java
[For beginners] Run Selenium in Java
Java for beginners, expressions and operators 2
Null / empty string judgment 2.0 using Optional
StringBuffer and StringBuilder Class in Java
[Java] Judgment of identity and equivalence
Understanding equals and hashCode in Java
Settings for SSL debugging in Java
Classes and instances Java for beginners
Hello world in Java and Gradle
Let's think about what declarative programming is in Java and Elm (Part 1)
This and that of the implementation of date judgment within the period in Java
Review of "strange Java" and Java knowledge that is often forgotten in Java Bronze
What is a class in Java language (3 /?)
Difference between final and Immutable in Java
First steps for deep learning in Java
Key points for introducing gRPC in Java
[For beginners] Difference between Java and Kotlin
What is a class in Java language (1 /?)
What is Java and Development Environment (MAC)
What is a class in Java language (2 /?)
Convenient plugin for Eclipse JAVA development: Decompiler
[Java] Proxy for logging SQL and SQL results
Arrylist and linked list difference in java
Program PDF headers and footers in Java
A simple and convenient method for HashMap
Learn Flyweight patterns and ConcurrentHashMap in Java
Java Direction in C ++ Design and Evolution
Java to C and C to Java in Android Studio
Reading and writing gzip files in Java
Difference between int and Integer in Java
Discrimination of Enums in Java 7 and above
[Java] Difference between equals and == in a character string that is a reference type
Impressions and doubts about using java for the first time in Android Studio
[Deep Learning from scratch] in Java 1. For the time being, differentiation and partial differentiation