pub fn to_bytesize(text: &str) -> Result<usize, ParseSizeError>
Expand description
Parse human-readable byte size string to usize
ยงExample:
let bytes = rmqtt_utils::to_bytesize("2G512K");
assert_eq!(bytes, Ok(2148007936));
let complex = rmqtt_utils::to_bytesize("1G500M256K1024B");
assert_eq!(complex, Ok(1598292992));