#hex #utilities #numbers

hex-utilities

Utilities for working with hexadecimal numbers

6 releases

0.1.5 Sep 27, 2022
0.1.4 Sep 27, 2022
0.1.2 Aug 25, 2022

#126 in #hex

Download history 18/week @ 2024-04-15 21/week @ 2024-04-22 19/week @ 2024-04-29 21/week @ 2024-05-06 21/week @ 2024-05-13 23/week @ 2024-05-20 9/week @ 2024-05-27 23/week @ 2024-06-03 22/week @ 2024-06-10 48/week @ 2024-06-17 23/week @ 2024-06-24 13/week @ 2024-07-08 25/week @ 2024-07-15 13/week @ 2024-07-22 18/week @ 2024-07-29

69 downloads per month
Used in 7 crates (6 directly)

MIT license

9KB
189 lines

Hex Utilities

A collection of utilities for working with hexadecimals

Install

Add package to Cargo.toml file

[dependencies]
hex-utilities = "0.1.5"

Usage:

use hex_utilities::{
    get_text_for_hex,
}

// Convert hext to text
// Should work similiar to this http://www.unit-conversion.info/texttools/hexadecimal
let hex = "30784e6f6e63652077617320666f756e646564".to_string();
let expected_text = "0xNonce was founded".to_string();
let maybe_text = get_text_for_hex(&hex);
let text = match maybe_text {
    Ok(text) => text.to_string(),
    Err(_) => "wrong".to_string(),
};
assert_eq!(text, expected_text);

Documentation

Available methods and documentation can be found here

License

MIT © Joe Gesualdo

Dependencies

~5KB