15 #ifndef INCG_IRIS_IUTEST_REGEX_HPP_1575CB44_189A_4248_B305_DB4882E3BFC2_
16 #define INCG_IRIS_IUTEST_REGEX_HPP_1575CB44_189A_4248_B305_DB4882E3BFC2_
20 #if IUTEST_HAS_CXX_HDR_REGEX
33 static bool match_impl(
const char* begin,
const char* end,
const char* src);
34 static bool match_impl_list(
const char* begin,
const char* end,
const char* src);
36 static bool match(
const char* regex,
const char* src);
39 #if IUTEST_HAS_CXX_HDR_REGEX
47 iuRegex(
const char* pattern) { Init(pattern); }
48 iuRegex(const ::std::string& pattern) { Init(pattern.c_str()); }
49 iuRegex(
const iuRegex & rhs) : m_re(rhs.m_re), m_pattern(rhs.m_pattern) {}
51 bool FullMatch(
const char* str)
const;
52 bool PartialMatch(
const char* str)
const;
54 const char* pattern()
const {
return m_pattern.c_str(); }
57 void Init(
const char* pattern);
61 ::std::string m_pattern;
73 #if IUTEST_HAS_CXX_HDR_REGEX
75 class RE :
public detail::iuRegex
78 RE(
const char* pattern) : detail::iuRegex(pattern) {}
79 RE(const ::std::string& pattern) : detail::iuRegex(pattern) {}
81 static bool FullMatch(const ::std::string& str,
const RE& re)
83 return FullMatch(str.c_str(), re);
85 static bool PartialMatch(const ::std::string& str,
const RE& re)
87 return PartialMatch(str.c_str(), re);
89 static bool FullMatch(
const char* str,
const RE& re)
91 const detail::iuRegex& r = re;
92 return r.FullMatch(str);
94 static bool PartialMatch(
const char* str,
const RE& re)
96 const detail::iuRegex& r = re;
97 return r.PartialMatch(str);
107 # include "../impl/iutest_regex.ipp"
#define IUTEST_PP_DISALLOW_ASSIGN(TypeName)
代入禁止定義
Definition: iutest_pp.hpp:38
iutest root namespace
Definition: iutest_charcode.hpp:33