[][src]Function numberkit::as_u8

pub fn as_u8<S>(text: S) -> Result<u8, ParseIntError> where
    S: AsRef<OsStr>, 

covert string to u8

Example

assert_eq!(1 as u8, numberkit::as_u8("1").unwrap());