Function bytes_to_string

Source
pub fn bytes_to_string(mybytes: &[u8]) -> String
Expand description

Converts a byte slice into a hexadecimal string prefixed with “0x”.

§Examples

use neo3::neo_types::bytes_to_string;
let bytes = [0xde, 0xad, 0xbe, 0xef];
let hex_string = bytes_to_string(&bytes);
assert_eq!(hex_string, "0xdeadbeef");