pub fn offset(b: u64) -> StringExpand description
Formats a memory offset as a hexadecimal string
Converts a u64 offset value into a formatted hexadecimal string with
a 0x prefix and zero-padding to 6 hexadecimal digits (8 characters total).
§Arguments
b- The offset value to format (typically a memory address)
§Returns
Returns a String containing the formatted offset in the format 0xNNNNNN
where N is a hexadecimal digit (6 hex digits total).
§Examples
use hx::offset;
assert_eq!(offset(0), "0x000000");
assert_eq!(offset(0x42), "0x000042");
assert_eq!(offset(0x1000), "0x001000");
assert_eq!(offset(0xFFFFFFFF), "0xffffffff");