36 #include <boost/algorithm/string/split.hpp> 40 std::vector<boost::string_ref>
StrSplit(boost::string_ref str, boost::string_ref delim)
42 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)
52 str.remove_prefix(p + 1);
58 : _full_pattern(pattern), _full_alias(alias), _full_substitution(substitution)
67 _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