static String stripRules(String rules) {
        StringBuilder strippedRules = new StringBuilder();
        int rulesLength = rules.length();
        for (int idx = 0; idx < rulesLength;) {
            char ch = rules.charAt(idx++);
            if (ch == '#') {
                while (idx < rulesLength
                        && ch != '\r' && ch != '\n' && ch != chNEL) {
                    ch = rules.charAt(idx++);
                }
            }
            if (!UCharacter.isISOControl(ch)) {
                strippedRules.append(ch);
            }
        }
        return strippedRules.toString();
    }
static String stripRules ( String rules ) { StringBuilder strippedRules = new StringBuilder ( ) ; int rulesLength = rules . length ( ) ; for ( int idx = 0 ; idx < rulesLength ; ) { char ch = rules . charAt ( idx ++ ) ; if ( ch == '#' ) { while ( idx < rulesLength && ch != '\r' && ch != '\n' && ch != chNEL ) { ch = rules . charAt ( idx ++ ) ; } } if ( ! UCharacter . isISOControl ( ch ) ) { strippedRules . append ( ch ) ; } } return strippedRules . toString ( ) ; }
----------------------------------------------------------------------------------------