Module cuttlefish_bytesize

Function Index

parse/1the reverse of to_string/1.
to_string/1turns an integer of bytes into a string.

Function Details

parse/1

parse(String::string()) -> integer() | cuttlefish_error:error()

the reverse of to_string/1. turns "1kb" or "1KB" into 1024.

to_string/1

to_string(Bytez::integer()) -> string()

turns an integer of bytes into a string. Will use the smallest unit to not lose precision. e.g. 1024 -> 1kb, but 1025 = 1025.


Generated by EDoc