Skip to content

StringUtils.isEmpty

Signature: StringUtils.isEmpty(inputString)

Returns: Boolean isEmpty - true if the inputString is null or empty

Checks if the inputString is null or empty ("").

Parameters

Type Name Description Default
String inputString the String to check, may be null

Example

StringUtils.isEmpty('Not empty');                   // false
StringUtils.isEmpty('                          ');  // false
StringUtils.isEmpty('');                            // true
StringUtils.isEmpty(null);                          // true