Function ascii_converter::hexadecimal_to_string
source · [−]Expand description
This function returns a hexadecimal number’s string representation.
Takes in a Vec<String>
and converts each element to a char
then places them in a string.
Any string passed in via the parameters should be a valid hexadecimal number, if not a error will
be returned in the Results
enum.
Example
use ascii_converter::*;
let input = vec![
"48".to_string(),
"65".to_string(),
"6C".to_string(),
"6C".to_string(),
"6F".to_string(),
"20".to_string(),
"57".to_string(),
"6f".to_string(),
"72".to_string(),
"6c".to_string(),
"64".to_string(),
"21".to_string()
];
assert_eq!(hexadecimal_to_string(&input).unwrap(), "Hello World!".to_string());