use std::str::FromStr;
use aoko::no_std::{functions::ext::Utf8Ext, pipelines::pipe::Pipe};
use ibig::UBig;
pub mod cli;
pub fn int_to_hex(i: &str) {
println!("int to hex: 0x{:0>64x}", UBig::from_str(i).unwrap())
}
pub fn str_to_hex(s: &str) {
println!("str to hex: 0x{:0<64x}", s.as_bytes().pipe(UBig::from_be_bytes))
}
pub fn hex_to_int(h: &str) {
println!("hex to int: {}", h.trim_start_matches("0x").pipe(hex::decode).unwrap().as_slice().pipe(UBig::from_be_bytes))
}
pub fn hex_to_str(h: &str) {
println!("hex to str: {}", h.trim_start_matches("0x").pipe(hex::decode).unwrap().to_str().unwrap())
}