[#ParseByteUnits] = ParseByteUnits :mrdocs: Parse a string with suffix unit [k|K|m|M|g|G|t|T]. Must be a whole integer, fractions not allowed (0.5t), no whitespace or +‐ Lowercase units are 1000 base. Uppercase units are 1024 base. Examples: 2m,27M,19g,41T == Synopsis Declared in `<util/strencodings.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<uint64_t> ParseByteUnits( std::string_view str, xref:ByteUnit.adoc[ByteUnit] default_multiplier); ---- == Return Value optional uint64_t bytes from str or nullopt if ToIntegral is false, str is empty, trailing whitespace or overflow == Parameters [cols="1,4"] |=== | Name| Description | *str* [in] | the string to convert into bytes | *default_multiplier* [in] | if no unit is found in str use this unit |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#