pub fn parse_string_u64(u64_str: &str) -> Result<u64, TypeError>
Expand description
Parses a string into a u64
, supporting both decimal and hexadecimal (prefixed with “0x”) formats.
§Examples
use neo3::neo_types::parse_string_u64;
let decimal = "12345";
assert_eq!(parse_string_u64(decimal).unwrap(), 12345);
let hex = "0x3039";
assert_eq!(parse_string_u64(hex).unwrap(), 12345);