Added documentation details

This commit is contained in:
Oowekyala
2017-05-06 02:14:05 +02:00
parent 39eb79f58e
commit fdff9bb964
@@ -221,7 +221,10 @@ if (s.indexOf('d') {}
String.trim().length() is an inefficient way to check if a String is really empty, as it
creates a new String object just to check its size. Consider creating a static function that
loops through a string, checking Character.isWhitespace() on each character and returning
false if a non-whitespace character is found.
false if a non-whitespace character is found. Note that Apache's commons-lang library includes
the isBlank function, which does exactly that. You can also copy the source code of the function
(https://commons.apache.org/proper/commons-lang/apidocs/src-html/org/apache/commons/lang3/StringUtils.html#line.296)
if you'd rather not add the library to your classpath.
</description>
<priority>3</priority>
<example>