47#if HAVE_BOOST_REGEX_UNICODE
56#if HAVE_BOOST_REGEX_UNICODE
62 explicit mask_t(
const string& pattern);
84 bool match(
const string& text)
const {
85#if HAVE_BOOST_REGEX_UNICODE
87 "Matching: \"" << text <<
"\" =~ /" <<
str() <<
"/ = "
88 << (boost::u32regex_search(text,
expr) ?
"true" :
"false"));
89 return boost::u32regex_search(text,
expr);
92 "Matching: \"" << text <<
"\" =~ /" <<
str() <<
"/ = "
93 << (boost::regex_search(text,
expr) ?
"true" :
"false"));
94 return boost::regex_search(text,
expr);
104#if HAVE_BOOST_REGEX_UNICODE
105 assert(
sizeof(boost::uint32_t) ==
sizeof(UChar32));
107 std::basic_string<UChar32> expr_str =
expr.str();
108 std::copy(expr_str.begin(), expr_str.end(),
120 if (
expr.status() != 0) {
121 DEBUG(
"ledger.validate",
"mask_t: expr.status() != 0");
134 pt.put_value(mask.
str());
General utility facilities used by Ledger.
#define TRACE_CTOR(cls, args)
std::ostream & operator<<(std::ostream &out, const account_t &account)
void put_mask(property_tree::ptree &pt, const mask_t &mask)
mask_t & operator=(const string &other)
mask_t(const string &pattern)
mask_t & assign_glob(const string &other)
bool match(const string &text) const
bool operator==(const mask_t &other) const
bool operator<(const mask_t &other) const
Abstract working with UTF-32 encoded Unicode strings.
std::string extract(const std::string::size_type begin=0, const std::string::size_type len=0) const
std::vector< boost::uint32_t > utf32chars