Skip to content

StringUtils.isAlpha

Signature: StringUtils.isAlpha(inputString)

Returns: Boolean result - true if inputString contains only letters or is empty

Checks if the inputString contains only letters. null will return false. An empty ("") string will return true.

Parameters

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

Example

StringUtils.isAlpha('SPACES ARE NOT ALPHA');                    // false
StringUtils.isAlpha('IFALLTHELETTERSAREalphaYOUAREGOLDEN');     // true