get_byte_slice_of

Function get_byte_slice_of 

Source
pub fn get_byte_slice_of<'g>(
    src: *const u8,
    index: usize,
    count: usize,
) -> &'g [u8] 
Expand description

retrieves a slice of N bytes from contiguous memory area where N=count starting at index

Example

use utf8_rune::pointer::get_byte_slice_of;
let ptr = "UNICODE".as_bytes().as_ptr();
assert_eq!(get_byte_slice_of(ptr, 2, 3), b"ICO");