Remove all blank lines (blank lines are those with zero characters).
963652
def remove_blank_lines(self):
        """"""
        to_remove = []
        for i, line in enumerate(self):
            ln = line.strip()
            if ln == '':
                to_remove.append(i)
        self.delete_lines(to_remove)
41616
def remove_empty(rec):
    
    for header, sequence in rec.mapping.items():
        if all(char == 'X' for char in sequence):
            rec.headers.remove(header)
            rec.sequences.remove(sequence)
    rec.update()
    return rec
208907
def delete_blank_columns!(*options)
      exceptions = extract_exceptions(options)

      (columns.map(&:key) - exceptions).each do |key|
        if rows.all? { |row| is_blank?(row[key]) || is_zero?(row[key]) } # rubocop:disable Style/IfUnlessModifier
          delete_column key
        end
      end
    end
1170664
def remove_all_gap_columns( components ):
            
    seqs = [ list( c.text ) for c in components ]
    i = 0
    text_size = len( seqs[0] )
    while i < text_size:
        all_gap = True
        for seq in seqs:
            if seq[i] != '-': all_gap = False
        if all_gap:
            for seq in seqs: del seq[i]
            text_size -= 1
        else:
            i += 1
    for i in range( len( components ) ):
        components[i].text = ''.join( seqs[i] )
1173173
function removeComplete(regex, lines, start) {
  var matches = lines[start].match(regex);
  var i = 0;
  var s = lines[start];
  matches = s.match(regex);

  while (!matches) {
    i++;
    if ((start + i) > lines.length) return;
    s += lines[start + i];
    matches = s.match(regex);
  }
  lines.splice(start, i + 1);
}
879102
def tidy_blank_lines
      (@fragments.size - 1).times do |i|
        if @fragments[i].kind_of?(BlankLine) and 
            @fragments[i+1].kind_of?(ListEnd)
          @fragments[i], @fragments[i+1] = @fragments[i+1], @fragments[i] 
        end
      end

      # remove leading blanks
      @fragments.each_with_index do |f, i|
        break unless f.kind_of? BlankLine
        @fragments[i] = nil
      end

      @fragments.compact!
    end
237370
def clean(self, text):
        """"""
        return ''.join([c for c in text if c in self.alphabet])
32740
def remove_empty_text(utterances: List[Utterance]) -> List[Utterance]:
    
    return [utter for utter in utterances if utter.text.strip() != ""]
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
483801
def _strip_empty_keys(self, params):
        
        keys = [k for k, v in params.items() if v == '']
        for key in keys:
            del params[key]
219360
def rm_blanks(self):
        
        _blanks = [k for k in self._dict.keys() if not self._dict[k]]
        for key in _blanks:
            del self._dict[key]
54963
def remove_all_gap_columns( self ):
        
        seqs = []
        for c in self.components:
            try:
                seqs.append( list( c.text ) )
            except TypeError:
                seqs.append( None )
        i = 0
        text_size = self.text_size
        while i < text_size:
            all_gap = True
            for seq in seqs:
                if seq is None: continue
                if seq[i] != '-': all_gap = False
            if all_gap:
                for seq in seqs:
                    if seq is None: continue
                    del seq[i]
                text_size -= 1
            else:
                i += 1
        for i in range( len( self.components ) ):
            if seqs[i] is None: continue
            self.components[i].text = ''.join( seqs[i] )
        self.text_size = text_size
867267
function filter_lines_for_parsing(lines)
{
	// filter out blank lines
	lines = lines.filter(line => !is_blank(line.line))

	lines.forEach(function(line)
	{
		// remove single line comments
		line.line = line.line.replace(/^\s*\/\/.*/, '')
		// remove any trailing whitespace
		line.line = line.line.trim()
	})

	return lines
}
77515
private static String cleanLine(String line) {
        return line.replace("/**", EMPTY_STRING).replace("/*", EMPTY_STRING)
                .replace("*", EMPTY_STRING).replace("#", EMPTY_STRING)
                .replace("/", EMPTY_STRING).replace("\\t", EMPTY_STRING)
                .replace("\\n", EMPTY_STRING).trim();
    }
275027
protected void clearLine() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < terminal.getWidth(); i++) {
            sb.append(" ");
        }
        console.out().print(sb.toString());
    }
1162155
function trim(text) {
  var MAX_INDENT = 9999;
  var empty = RegExp.prototype.test.bind(/^\s*$/);
  var lines = text.split('\n');
  var minIndent = MAX_INDENT;
  var indentRegExp;
  var ignoreLine = (lines[0][0] != ' '  && lines.length > 1);
  // ignore first line if it has no indentation and there is more than one line

  lines.forEach(function(line){
    if (ignoreLine) {
      ignoreLine = false;
      return;
    }

    var indent = line.match(/^\s*/)[0].length;
    if (indent > 0 || minIndent == MAX_INDENT) {
      minIndent = Math.min(minIndent, indent);
    }
  });

  indentRegExp = new RegExp('^\\s{0,' + minIndent + '}');

  for ( var i = 0; i < lines.length; i++) {
    lines[i] = lines[i].replace(indentRegExp, '');
  }

  // remove leading lines
  while (empty(lines[0])) {
    lines.shift();
  }

  // remove trailing
  while (empty(lines[lines.length - 1])) {
    lines.pop();
  }
  return lines.join('\n');
}
1090530
public static String removeEmptyLine(String str) {
        assertStringNotNull(str);
        final StringBuilder sb = new StringBuilder();
        final List<String> lineList = splitList(str, "\n");
        for (String line : lineList) {
            if (is_Null_or_TrimmedEmpty(line)) {
                continue; // skip
            }
            sb.append(removeCR(line)).append("\n");
        }
        final String filtered = sb.toString();
        return filtered.substring(0, filtered.length() - "\n".length());
    }