private static String cleanAlias ( String alias ) { char [ ] chars = alias . toCharArray ( ) ; // short cut check... if ( ! Character . isLetter ( chars [ 0 ] ) ) { for ( int i = 1 ; i < chars . length ; i ++ ) { // as soon as we encounter our first letter, return the substring // from that position if ( Character . isLetter ( chars [ i ] ) ) { return alias . substring ( i ) ; } } } return alias ; }
Clean the generated alias by removing any non - alpha characters from the beginning .