/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/utils.hh Source File#
|
DiFfRG
|
utils.hh
Go to the documentation of this file.
39 std::shared_ptr<spdlog::logger> build_logger(const std::string &name, const std::string &filename);
Definition complex_math.hh:10
std::string make_folder(const std::string &path)
Add a trailing '/' to a string, in order for it to be in standard form of a folder path.
bool create_folder(const std::string &path_)
Creates the directory path, even if its parent directories should not exist.
std::shared_ptr< spdlog::logger > build_logger(const std::string &name, const std::string &filename)
std::string time_format_ms(size_t time_in_miliseconds)
Nice output from seconds to h/min/s style string.
std::string getWithPrecision(uint precision, T number)
Return number with fixed precision after the decimal point.
Definition utils.hh:60
bool has_suffix(const std::string &str, const std::string &suffix)
constexpr void constexpr_for(F &&f)
A compile-time for loop, which calls the lambda f of signature void(integer) for each index.
Definition utils.hh:31
std::string time_format(size_t time_in_seconds)
Nice output from seconds to h/min/s style string.
std::string strip_name(const std::string &name)
Strips all special characters from a string, e.g. for use in filenames.
std::string to_string_with_digits(const T number, const int digits)
Return number with fixed significant digits.
Definition utils.hh:77
std::vector< double > string_to_double_array(const std::string &str)
Takes a string of comma-separated numbers and outputs it as a vector.
Generated by