drumatech 0.1.3

a crate that has a little utility.
Documentation
/// convert byte to string with copying value.
///
/// # Examples
///
/// ```
/// extern crate drumatech;
/// use drumatech::conv;
/// let c : u8  = 0x41;
/// let s : String = conv::u8_give_string(c);
/// assert_eq!(String::from("A"),s);
/// ```
pub fn u8_give_string(mut c: u8) -> String {
    use std::slice;
    use std::str;

    str::from_utf8(slice::from_mut(&mut c)).unwrap().to_string()
}

/// convert byte to string that giving mutable reference to func.
///
/// # Examples
///
/// ```
/// extern crate drumatech;
/// use drumatech::conv;
/// let mut c : u8  = 0x41;
/// let s : String = conv::u8_to_string(&mut c);
/// assert_eq!(String::from("A"),s);
/// ```
pub fn u8_to_string(c: &mut u8) -> String {
    use std::slice;
    use std::str;
    str::from_utf8(slice::from_mut(c)).unwrap().to_string()
}