1#ifndef PORYTILES_UTILITIES_H
2#define PORYTILES_UTILITIES_H
14 T arg = std::stoi(integerString, &pos, base);
15 if (std::string{integerString}.size() != pos) {
17 throw std::runtime_error{
"invalid integral string: " + std::string{integerString}};
20 }
catch (
const std::exception &e) {
21 throw std::runtime_error{e.what()};
24 throw std::runtime_error(
"utilities::parseInteger reached unreachable code path");
29 return parseInteger<T>(integerString, 0);
32std::vector<std::string>
split(std::string input,
const std::string &delimiter);
36void trim(std::string &
string);
38std::filesystem::path
getTmpfilePath(
const std::filesystem::path &parentDir,
const std::string &fileName);
bool checkFullStringMatch(const std::string &str, const std::string &pattern)
std::filesystem::path getTmpfilePath(const std::filesystem::path &parentDir, const std::string &fileName)
std::filesystem::path createTmpdir()
std::string palIndexToFileName(std::size_t index)
std::vector< std::string > split(std::string input, const std::string &delimiter)
T parseInteger(const char *integerString, const int base)
void trim(std::string &string)