pub fn drain(&mut self) -> Drain {
        unsafe {
            let len = self.len();

            self.data.set_len(0);

            let ptr = self.as_ptr();

            let slice = slice::from_raw_parts(ptr, len);
            let s = str::from_utf8_unchecked(slice);

            Drain { iter: s.chars() }
        }
    }
/// Empties the string and returns an iterator over its former contents.
Empties the string and returns an iterator over its former contents.
Empties the string and returns an iterator over its former contents .
pub fn drain(&mut self) -> Drain {
        unsafe {
            let len = self.len();
            self.data.set_len(0);
            let ptr = self.as_ptr();
            let slice = slice::from_raw_parts(ptr, len);
            let s = str::from_utf8_unchecked(slice);
            Drain { iter: s.chars() }
        }
    }
pub fn drain ( & mut self ) -> Drain { unsafe { let len = self . len ( ) ; self . data . set_len ( 0 ) ; let ptr = self . as_ptr ( ) ; let slice = slice :: from_raw_parts ( ptr , len ) ; let s = str :: from_utf8_unchecked ( slice ) ; Drain { iter : s . chars ( ) } } }
Empties the string and returns an iterator over its former contents.
Empties the string and returns an iterator over its former contents .
&mut self
&mut self