Skip to content

StringUtils.isNotEmpty

Signature: StringUtils.isNotEmpty(inputString)

Returns: Boolean isNotEmpty - true if the inputString is not empty and not null

Checks if the inputString is not empty ("") and not null.

Parameters

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

Example

StringUtils.isNotEmpty("      ");           // true
StringUtils.isNotEmpty("");                 // false
StringUtils.isNotEmpty("    pomme       "); // true