Removes all BBcodes after a given position
961006
public function remove_bbcodes_after()
	{
		for ($i = 1; $i <= $this->array_size; $i++)
		{
			if ($this->bbcode_list[$this->array_size - $i]['open_start'] >= $this->trim_position)
			{
				unset($this->bbcode_list[$this->array_size - $i]);
			}
		}

		$this->array_size = sizeof($this->bbcode_list);
	}
360138
function removeNestedBlocks (ast) {
  var tagged;
  while((tagged = findNestedBlocks(ast)).length) {
    fast.forEach(tagged, function (item) {
      var node = item[0],
          parent = item[1],
          index = parent.body.indexOf(node);
      fast.apply(Array.prototype.splice, parent.body, fast.concat([index, 1], node.body));
    });
  }
  return ast;
}
264984
public void removeAll()
    {
        if (m_gridList != null)
            m_gridList.removeAll();
        if (m_gridBuffer != null)
            m_gridBuffer.removeAll();
        if (m_gridNew != null)
            m_gridNew.removeAll();
        m_iEndOfFileIndex = UNKNOWN_POSITION;
        m_iPhysicalFilePosition = UNKNOWN_POSITION;
        m_iLogicalFilePosition = UNKNOWN_POSITION;
    }
895232
function stripBlockBr( element ) {
		var br;

		if ( element.previous && !isBrOrBlock( element.previous ) ) {
			br = createBr();
			br.insertBefore( element );
		}

		if ( element.next && !isBrOrBlock( element.next ) ) {
			br = createBr();
			br.insertAfter( element );
		}

		element.replaceWithChildren();
	}
433054
function trim(rootBlockNode) {
            if (rootBlockNode) {
              node = rootBlockNode.firstChild;
              if (node && node.type == 3) {
                node.value = node.value.replace(startWhiteSpaceRegExp, '');
              }

              node = rootBlockNode.lastChild;
              if (node && node.type == 3) {
                node.value = node.value.replace(endWhiteSpaceRegExp, '');
              }
            }
          }
788195
public void cleanUp() {
	int nI;
	for (nI = 0; nI < PBOX_ENTRIES; nI++)
	    m_pbox[nI] = 0;
	for (nI = 0; nI < SBOX_ENTRIES; nI++)
	    m_sbox1[nI] = m_sbox2[nI] = m_sbox3[nI] = m_sbox4[nI] = 0;
    }
1097511
def _remove_texttuple(self, pos):
        """"""
        for i, (old_x, old_y, s, old_cs, d) in enumerate(self.value):
            if (old_x, old_y, old_cs) == pos:
                self.value.pop(i)
                return
        raise ValueError("{0} not found!".format(pos))
790106
function cleanSingleHeader(e) {
  for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
    var headers = e.getElementsByTagName('h' + headerIndex);
    for (var i = headers.length - 1; i >= 0; --i) {
      if (headers[i].nextSibling === null) {
        headers[i].parentNode.removeChild(headers[i]);
      }
    }
  }

}
605155
def trim(self, length):
        """"""
        if length > 0:
            for child in self.children.values(): child.trim(length-1)
        else:
            if hasattr(self, 'count'): self.count = sum(map(lambda x: x.count, self))
            self.children = OrderedDict()
195253
def clear(self):
        """"""
        for i, value in enumerate(self.buffer):
            self.buffer[i] = 0
653683
def _clean(self):
        """"""
        found_ids = {}
        nodes = [self._nodes[_node.Root.ID]]
        while nodes:
            node = nodes.pop()
            found_ids[node.id] = None
            nodes = nodes + node.children

        for node_id in self._nodes:
            if node_id in found_ids:
                continue
            logger.error('Dangling node: %s', node_id)

        for node_id in found_ids:
            if node_id in self._nodes:
                continue
            logger.error('Unregistered node: %s', node_id)
182565
def _replace_bbox_none(self, bbox):
        """"""

        (bb_top, bb_left), (bb_bottom, bb_right) = bbox

        if bb_top is None:
            bb_top = 0

        if bb_left is None:
            bb_left = 0

        if bb_bottom is None:
            bb_bottom = self.code_array.shape[0] - 1

        if bb_right is None:
            bb_right = self.code_array.shape[1] - 1

        return (bb_top, bb_left), (bb_bottom, bb_right)
1033052
def stopAll(widget):
        
        for loader in widget.findChildren(XLoaderWidget):
            loader.setParent(None)
            loader.deleteLater()
569335
function cleanAlphabet(alphabet) {
    return alphabet.split('').filter(function (item, pos, self) {
      return self.indexOf(item) === pos;
    }).join('');
  }
245705
def remove_all(self):
        ''''''
        if self._children:
            for child in self._children:
                if isinstance(child, String):
                    child._parent = None
            self._children = []
756115
def clean_up(self):#, grid):
        
        if self.selected_col:
            col_label_value = self.grid.GetColLabelValue(self.selected_col)
            col_label_value = col_label_value.strip('\nEDIT ALL')
            self.grid.SetColLabelValue(self.selected_col, col_label_value)
            for row in range(self.grid.GetNumberRows()):
                self.grid.SetCellBackgroundColour(row, self.selected_col, 'white')
        self.grid.ForceRefresh()
569400
def OnReplaceAll(self, event):
        """"""

        find_string = event.GetFindString()
        flags = self._wxflag2flag(event.GetFlags())
        replace_string = event.GetReplaceString()

        findpositions = self.grid.actions.find_all(find_string, flags)

        with undo.group(_("Replace all")):
            self.grid.actions.replace_all(findpositions, find_string,
                                          replace_string)

        event.Skip()