public String cleanFixedLine ( final String line ) { StringBuilder cleanedLine = new StringBuilder ( ) ; int length = line . length ( ) ; /* Clear sequence numbering */ for ( int i = 0 ; i < _startColumn - 1 ; i ++ ) { cleanedLine . append ( " " ) ; } /* Trim anything beyond end column */ if ( length > _startColumn - 1 ) { String areaA = line . substring ( _startColumn - 1 , ( length > _endColumn ) ? _endColumn : length ) ; cleanedLine . append ( areaA ) ; } return cleanedLine . toString ( ) ; }
Clear sequence numbers in column 1 - 6 and anything beyond column 72 .