public static String toIdentityVariableName(String varName) {
	char[] chars = varName.toCharArray();
	long changes = 0;

	StringBuilder rtn = new StringBuilder(chars.length + 2);
	rtn.append("CF");

	for (int i = 0; i < chars.length; i++) {
	    char c = chars[i];
	    if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) rtn.append(c);
	    else {
		rtn.append('_');
		changes += (c * (i + 1));
	    }
	}

	return rtn.append(changes).toString();
    }
public static String toIdentityVariableName ( String varName ) { char [ ] chars = varName . toCharArray ( ) ; long changes = 0 ; StringBuilder rtn = new StringBuilder ( chars . length + 2 ) ; rtn . append ( "CF" ) ; for ( int i = 0 ; i < chars . length ; i ++ ) { char c = chars [ i ] ; if ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) ) rtn . append ( c ) ; else { rtn . append ( '_' ) ; changes += ( c * ( i + 1 ) ) ; } } return rtn . append ( changes ) . toString ( ) ; }
translate a string to a valid identity variable name

@param varName variable name template to translate
@return translated variable name