Skip to main content

parse_byte_size

Function parse_byte_size 

Source
pub fn parse_byte_size(s: &str) -> Result<usize, String>
Expand description

Parse a human-readable byte size: “10mb”, “512kb”, “1gb”, “256b”, or a plain integer. Case-insensitive. Accepts both “mb” and “mib” (binary interpretation throughout).