Skip to main content

format_bytes

Function format_bytes 

Source
pub fn format_bytes(bytes: i64) -> String
Expand description

bytes as text: "1 byte" and "999 bytes", then one decimal place in the largest unit that keeps the number at least 1, such as "1.5 MB".