pub fn drain_init(&mut self, len: usize) {
        if len == 0 {
            return;
        }
        if len >= self.len() {
            self.clear();
            return;
        }

        self.bytes.drain(..len);

        if len < self.ascii_len {
            self.ascii_len -= len;
        } else {
            self.is_utf8 = if self.is_utf8 {
                is_utf8_leading_byte(self.bytes[0])
            } else {
                from_utf8(&self.bytes).is_ok()
            };
            self.ascii_len = compute_ascii_len(&self.bytes);
        }

        self.debug_validate();
    }
/// Drops the first `len` bytes from the byte string.
Drops the first `len` bytes from the byte string.
Drops the first ` len ` bytes from the byte string .
pub fn drain_init(&mut self, len: usize) {
        if len == 0 {
            return;
        }
        if len >= self.len() {
            self.clear();
            return;
        }
        self.bytes.drain(..len);
        if len < self.ascii_len {
            self.ascii_len -= len;
        } else {
            self.is_utf8 = if self.is_utf8 {
                is_utf8_leading_byte(self.bytes[0])
            } else {
                from_utf8(&self.bytes).is_ok()
            };
            self.ascii_len = compute_ascii_len(&self.bytes);
        }
        self.debug_validate();
    }
pub fn drain_init ( & mut self , len : usize ) { if len == 0 { return ; } if len >= self . len ( ) { self . clear ( ) ; return ; } self . bytes . drain ( .. len ) ; if len < self . ascii_len { self . ascii_len -= len ; } else { self . is_utf8 = if self . is_utf8 { is_utf8_leading_byte ( self . bytes [ 0 ] ) } else { from_utf8 ( & self . bytes ) . is_ok ( ) } ; self . ascii_len = compute_ascii_len ( & self . bytes ) ; } self . debug_validate ( ) ; }
Drops the first `len` bytes from the byte string.
Drops the first ` len ` bytes from the byte string .
&mut self
len
usize
&mut self
len
usize