36 #include <boost/algorithm/string/split.hpp> 41 std::vector<boost::string_ref>
StrSplit(boost::string_ref str, boost::string_ref delim)
43 std::vector<boost::string_ref> out;
46 p = str.find_first_of(delim);
47 out.push_back(str.substr(0,p));
48 if (p == boost::string_ref::npos) {
51 str.remove_prefix(p + 1);
57 _full_pattern(pattern),
59 _full_substitution(substitution)
68 _hash = (h1 ^ (h2 << 1)) ^ (h3 << 1 );
std::vector< boost::string_ref > StrSplit(boost::string_ref str, boost::string_ref delim)
std::vector< boost::string_ref > _alias
SubstitutionRule & operator=(const SubstitutionRule &other)
std::vector< boost::string_ref > _pattern
std::string _full_pattern
SubstitutionRule(const char *pattern, const char *alias, const char *substitution)
Pass the three arguments (pattern, alias, substitution) as point separated strings.
std::vector< boost::string_ref > _substitution
std::string _full_substitution