Skip to main content

parse_byte_size

Function parse_byte_size 

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

Parses a "<n> <unit>" string (e.g. "1 GB", "512 mb") into a byte count. Accepted units, case insensitive and base 1024: B, KB, MB, GB.