jweinst1
4/10/2017 - 1:02 AM

byteslice.rs

//str can transform into bytes


//gets byte slice
fn bytes(input:&str) -> &[u8] {
    input.as_bytes()
}



fn main(){
    println!("{:?}", "fooo".as_bytes());
    println!("{:?}", bytes("$$$"))
}