If you are using Gradle, add the following dependency to your build.gradle file: implementation 'org.apache.commons:commons-lang3:3.9' For Maven, add the dependency below to your pom.xml file: org.apache.commons commons-lang3 StringUtils provides null-safe methods for handling Strings and is probably the most commonly used class in the Apache Commons project. A simple Java string utility library. org.apache.commons commons-lang3 3.9 Following Java program reads an integer value from the user into a String and removes the leading zeroes from it using the stripStart() method of the StringUtils class. The Apache Commons Lang library is another way to capitalize the first letter of a string in Java. All JAR files containing the class org.apache.commons.lang.StringUtils file are … To get started with the StringUtils first thing we need to do is to add the dependency to our Maven-Project. StringUtils public StringUtils() Method Detail. StringUtils.isBlank() method check to see is the string contains only whitespace characters, empty or has a null value. Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang. License Apache 2.0 This method can accept unicode digits in any language. License Apache 2.0 The class consists a lot many utility methods, all of which are very difficult to cover here, so we’ll take a look at some of the widely used methods. The java.lang.String class offers a limited set of String methods so this is where StringUtils comes in. If these condition is true that the string considered blank. Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang. Contribute to giorgosart/java-string-utils development by creating an account on GitHub. isBlank public static boolean isBlank(java.lang.String str) isEmpty public static boolean isEmpty(java.lang.String str) startsWith public static boolean startsWith(java.lang.String str, java.lang.String prefix) substringAfter There’s also a StringUtils.isEmpty(), only these method doesn’t check for whitespaces only string.For checking the opposite condition there are StringUtils.isNotBlank() and StringUtils.isNotEmpty(). This page shows details for the Java class StringUtils contained in the package org.apache.commons.lang. It can not accept positive or negative signs or decimal points. StringUtils.isNumeric(CharSequence) StringUtils.isNumeric(CharSequence) checks if the CharSequence contains only Unicode digits. The first utility class that we'll cover in this introductory roundup is StringUtils.. As its name suggests, StringUtils allows us to perform a bunch of null-safe strings operations that complement/extend the ones that java.lang.String provides out of the box.