nd4j-common/src/main/java/org/nd4j/util/StringUtils.java
public static boolean isAlpha(String str) {
        if (str == null) {
            return false;
        }
        int sz = str.length();
        for (int i = 0; i < sz; i++) {
            if (!Character.isLetter(str.charAt(i))) {
                return false;
            }
        }
        return true;
    }
public static boolean isAlpha(String str) {
        if (str == null) {
            return false;
        }
        int sz = str.length();
        for (int i = 0; i < sz; i++) {
            if (!Character.isLetter(str.charAt(i))) {
                return false;
            }
        }
        return true;
    }
public static boolean isAlpha ( String str ) { if ( str == null ) { return false ; } int sz = str . length ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { if ( ! Character . isLetter ( str . charAt ( i ) ) ) { return false ; } } return true ; }
<p>Checks if the String contains only unicode letters.</p>

<p><code>null</code> will return <code>false</code>.
An empty String (length()=0) will return <code>true</code>.</p>

<pre>
StringUtils.isAlpha(null)   = false
StringUtils.isAlpha("")     = true
StringUtils.isAlpha("  ")   = false
StringUtils.isAlpha("abc")  = true
StringUtils.isAlpha("ab2c") = false
StringUtils.isAlpha("ab-c") = false
</pre>

@param str  the String to check, may be null
@return <code>true</code> if only contains letters, and is non-null
<p > Checks if the String contains only unicode letters . < / p >