Jul-15-2019, 02:01 AM
i'm getting a string with a data size expressed in it like "4k", "32k", "4m", "16m", "1g". is there a Python library function that will do the conversion and give me the size as an int? support for size expressions like "3.5k" would be a plus.
edit:
i do want higher scale suffixes, too, as well as no suffix simple conversion.
edit2:
suffixes should be powers of 1024.
edit:
i do want higher scale suffixes, too, as well as no suffix simple conversion.
edit2:
suffixes should be powers of 1024.