Removes all prefixing zeros from the binary array.
493092
function removezeros(bin){
  var i = 0;
  while((i < bin.length) && (!bin[i])){i++;}
  if(i == bin.length){
    return filledarray(false, 1);
  }else{
    return bin.slice(i);
  }
}
504679
function removeTrailingZeros(str) {
  if (typeof str != 'string') throw new Error('in removeTrailingZeros, data type mismatch');

  let iNonZero = -1;
  for (let i = str.length - 1; i >= 0; i--) {
    if (charToVal(str[i]) != 0) {
      iNonZero = i; // index of the first nonzero digit from the right.
      break;
    }
  }
  str = str.slice(0, iNonZero + 1); // if 'str' is entirely zeros or is the empty string, gives ''.

  return str;
}
173738
function removeFromArray(array, value) {
    var idx = array.indexOf(value);
    if (idx !== -1) {
      array.splice(idx, 1);
    }
    return array;
  }
1027767
function zeroPad(array, length) {
  for (let i = array.length; i < length; i++) {
    array[i] = '0';
  }
}
842582
public void compress ()
    {
        for (Iterator<int[]> itr = values().iterator(); itr.hasNext(); ) {
            if (itr.next()[0] == 0) {
                itr.remove();
            }
        }
    }
60158
def clearData(self):
        """"""
        self._counts = np.zeros_like(self._bins)
        self.histo.setOpts(height=self._counts)
1310406
private int removeExplicitCodes() {
        int w = 0;
        for (int i = 0; i < textLength; ++i) {
            byte t = initialTypes[i];
            if (!(t == LRE || t == RLE || t == LRO || t == RLO || t == PDF || t == BN)) {
                embeddings[w] = embeddings[i];
                resultTypes[w] = resultTypes[i];
                resultLevels[w] = resultLevels[i];
                w++;
            }
        }
        return w; // new textLength while explicit levels are removed
    }
810764
public boolean removeAll(CompactIntSet ints) {
        int oldSize = size();
        bitSet.andNot(ints.bitSet);
        return oldSize != size();
    }
946441
def clean_with_zeros(self,x):
        
        x[~np.any(np.isnan(x) | np.isinf(x),axis=1)] = 0
        return x
1256857
private static String removeLeadingZeros(String generated) {
        StringBuilder builder = new StringBuilder();
        boolean leading = true;
        for (int i = 0; i < generated.length(); i++) {
            if (generated.charAt(i) == '0' && leading) {
                continue;
            } else {
                leading = false;
                builder.append(generated.charAt(i));
            }
        }
        
        if (builder.length() == 0) {
            // very unlikely to happen, ensures that empty string is not returned
            builder.append('0');
        }
        
        return builder.toString();
    }
275600
public static String removeLeadingZeros(final String str) {
    String result = str;
    if (str != null && str.length() != 0) {
      int startIndex = 0;
      while (startIndex < str.length() - 1) {
        final char ch = str.charAt(startIndex);
        if (ch != '0') {
          break;
        }
        startIndex++;
      }
      if (startIndex > 0) {
        result = str.substring(startIndex);
      }
    }
    return result;
  }
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
1334100
def trim(self, prefixes):
        ""
        _prefixes, prefixes = set(map(lambda k:self._prepare_key(k), prefixes)), list()
        for t in lookahead(sorted(_prefixes)):
            if t[1] is not None:
                if t[0] == commonprefix(t):
                    continue
            prefixes.append(t[0])
        length = 0
        for prefix in prefixes:
            length += self._trim(prefix)
        return length
1005088
private static String replaceLeadingZero(String generated) {
        if (generated.charAt(0) == '0') {
            // find number > 0 as replacement to avoid leading zero numbers
            int replacement = 0;
            while (replacement == 0) {
                replacement = generator.nextInt(10);
            }
            
            return replacement + generated.substring(1);
        } else {
            return generated;
        }
    }
653412
def clear(self):
        ""
        if isinstance(self.data, np.ndarray):
            data = self.data[:, :0]
        elif util.pd and isinstance(self.data, util.pd.DataFrame):
            data = self.data.iloc[:0]
        elif isinstance(self.data, dict):
            data = {k: v[:0] for k, v in self.data.items()}
        with util.disable_constant(self):
            self.data = data
        self.send(data)
926816
public void clear(int bitIndex) {
		if (bitIndex < 0)
			throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex);

		int wordIndex = wordIndex(bitIndex);
		if (wordIndex >= wordsInUse)
			return;

		words[wordIndex] &= ~(1L << bitIndex);

		recalculateWordsInUse();
		checkInvariants();
	}
270711
private function cleanup()
    {
        foreach ($this->tokens as $i => $t) {
            if ($t[0] === self::$deleteToken) {
                unset($this->tokens[$i]);
            }
        }
        $this->tokens = array_values($this->tokens);
    }