2 #include "boost/regex.hpp" 12 std::string
const& digitFormat)
36 for (; b1 != e1; ++b1, ++b2) {
37 if (b1->first < b2->first)
47 std::ostringstream num_str;
49 auto const& prefix = pr.first;
50 auto const& specifier = pr.second;
52 if (!specifier.empty()) {
53 num_str << std::setfill(
'0') << std::setw(std::stoul(specifier));
67 auto sid =
cbegin(pattern), se =
cend(pattern);
68 while (boost::regex_search(
72 boost::regex{
"%(\\d+)?#", boost::regex_constants::ECMAScript})) {
73 assert(match.size() == 2);
77 result.
add(match.prefix(), match[1].str());
78 sid = match[0].second;
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
bool operator<(FileNameComponents const &fnc) const
void setSuffix(std::string suffix)
FileNameComponents componentsFromPattern(std::string const &pattern)
std::string fileNameWithIndex(std::size_t index) const
void add(std::string const &prefix, std::string const &digitFormat)
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
std::vector< std::pair< std::string, std::string > > components_