Open wucke13 opened 3 years ago
You can use .to_bytes().len()
.
Agreeing with @Amanieu. "length" has two distinct meanings here (length with and length without the nul), so it's better to explicitly indicate which length to get either by using .to_bytes()
or .to_bytes_with_nul()
when asking length.
I would love to see some
.len()
functions in all the type of this crate.