Volume Cartographer 2.27.0
MemorySizeStringParser.hpp
Go to the documentation of this file.
1#pragma once
2
11#include <cstddef>
12#include <string>
13
14namespace volcart
15{
16
17enum class MemoryStringFormat { Int, Float };
31std::size_t MemorySizeStringParser(const std::string& s);
32
33std::string BytesToMemorySizeString(
34 std::size_t bytes,
35 const std::string& suffix = "GB",
36 MemoryStringFormat fmt = MemoryStringFormat::Int);
37} // namespace volcart
Volume Cartographer library
std::size_t MemorySizeStringParser(const std::string &s)
Converts strings describing memory sizes to byte values.