pub fn split_to(&mut self, at: usize) -> BytesMut {
        assert!(at <= self.len());

        BytesMut {
            inner: self.inner.split_to(at, false),
        }
    }
/// Splits the buffer into two at the given index.
///
/// Afterwards `self` contains elements `[at, len)`, and the returned `BytesMut`
/// contains elements `[0, at)`.
///
/// This is an `O(1)` operation that just increases the reference count and
/// sets a few indices.
///
/// # Examples
///
/// ```
/// use ntex_bytes::BytesMut;
///
/// let mut a = BytesMut::from(&b"hello world"[..]);
/// let mut b = a.split_to(5);
///
/// a[0] = b'!';
/// b[0] = b'j';
///
/// assert_eq!(&a[..], b"!world");
/// assert_eq!(&b[..], b"jello");
/// ```
///
/// # Panics
///
/// Panics if `at > len`.
Splits the buffer into two at the given index.

This is an `O(1)` operation that just increases the reference count and
sets a few indices.
Splits the buffer into two at the given index . This is an ` O ( 1 ) ` operation that just increases the reference count and sets a few indices .
pub fn split_to(&mut self, at: usize) -> BytesMut {
        assert!(at <= self.len());
        BytesMut {
            inner: self.inner.split_to(at, false),
        }
    }
pub fn split_to ( & mut self , at : usize ) -> BytesMut { assert ! ( at self len ( ) ) ; BytesMut { inner : self . inner . split_to ( at , false ) , } }
Splits the buffer into two at the given index.
Splits the buffer into two at the given index .
&mut self
at
usize
&mut self
at
usize
examples
```
use ntex_bytes::BytesMut.

let mut a = BytesMut::from(&b"hello world"[..]);
let mut b = a.split_to(5).




` ` ` use ntex_bytes :: BytesMut . let mut a = BytesMut :: from ( &b " hello world " [ .. ] ) ; let mut b = a . split_to ( 5 ) .
panics
Panics if `at > len`.
Panics if ` at > len ` .