23 #ifndef __ccxx_RegExp_hxx 24 #define __ccxx_RegExp_hxx 29 #include <sys/types.h> 47 : rm_so(-1), rm_eo(-1)
52 {
return(rm_so >= 0); }
56 {
return(rm_so >= 0 ? rm_so : 0); }
62 {
return((rm_eo >= 0) && (rm_so >= 0) ? rm_eo : 0); }
96 void setPattern(
const char* pattern,
bool caseInsensitive =
false)
97 { setPattern(
String(pattern), caseInsensitive); }
107 void setPattern(
const String& pattern,
bool caseInsensitive =
false);
111 {
return(_pattern); }
115 {
return(getPattern()); }
124 bool match(
const String& text)
const;
142 {
return(_pattern.isNull()); }
146 {
return(_pattern.isNull()); }
165 #endif // __ccxx_RegExp_hxx String getPattern() const
Get the regular expression pattern.
Definition: RegExp.h++:110
void setPattern(const char *pattern, bool caseInsensitive=false)
Set the regular expression pattern.
Definition: RegExp.h++:96
String toString() const
Get a String representation of the RegExp.
Definition: RegExp.h++:114
uint_t getEndIndex() const
Get the end index of the substring.
Definition: RegExp.h++:61
A regular expression.
Definition: RegExp.h++:75
bool operator!() const
Determine if this regular expression has a null pattern.
Definition: RegExp.h++:145
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
bool isNull() const
Determine if this regular expression has a null pattern.
Definition: RegExp.h++:141
RegExpMatch()
Constructor.
Definition: RegExp.h++:46
#define COMMONCPP_API
Definition: Common.h++:126
A regular expression substring match.
Definition: RegExp.h++:39
uint_t getStartIndex() const
Get the start index of the substring.
Definition: RegExp.h++:55
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
bool isValid() const
Determine if this match is valid.
Definition: RegExp.h++:51
Definition: AllocationMap.c++:25