The Qt regexp-engine A pretty dumb wrapper around the QRegExp Class.
More...
|
| QtRegExpEngine (const QString &pattern, bool caseSensitive, RegExp::Syntax syntax) |
| constructs the QRegExp engine More...
|
|
virtual | ~QtRegExpEngine () |
| destructs the QtRegExpEngine More...
|
|
virtual QString | pattern () |
| Returns the supplied pattern. More...
|
|
virtual bool | isValid () |
| Returns true if the given regular expression was valid. More...
|
|
virtual QString | error () |
| returns the error message More...
|
|
virtual int | indexIn (const QString &str, int offset) |
| returns the index of the regexp in the given string More...
|
|
virtual int | indexIn (const QChar *str, int offset, int length) |
| Warning index in with char pointers creates a string from the string. More...
|
|
virtual int | lastIndexIn (const QString &str, int offset) |
| Returns the last match of this regexp in the given string. More...
|
|
virtual int | lastIndexIn (const QChar *str, int offset, int length) |
| Returns the last match of this regexp in the given string. More...
|
|
virtual int | pos (int nth=0) const |
| returns the position of the nth group match More...
|
|
virtual int | len (int nth=0) const |
| returns the length of the nth group match More...
|
|
virtual QString | cap (int nth=0) const |
| returns the nth group More...
|
|
virtual | ~RegExpEngine () |
|
The Qt regexp-engine A pretty dumb wrapper around the QRegExp Class.
◆ QtRegExpEngine()
edbee::QtRegExpEngine::QtRegExpEngine |
( |
const QString & |
pattern, |
|
|
bool |
caseSensitive, |
|
|
RegExp::Syntax |
syntax |
|
) |
| |
|
inline |
constructs the QRegExp engine
- Parameters
-
pattern | the pattern to match |
caseSensitive | is the match case sensitive |
syntax | the used syntadx |
◆ ~QtRegExpEngine()
virtual edbee::QtRegExpEngine::~QtRegExpEngine |
( |
| ) |
|
|
inlinevirtual |
◆ cap()
virtual QString edbee::QtRegExpEngine::cap |
( |
int |
nth = 0 | ) |
const |
|
inlinevirtual |
returns the nth group
- Parameters
-
nth | the group number to return |
- Returns
- the content of the given match
Implements edbee::RegExpEngine.
◆ error()
virtual QString edbee::QtRegExpEngine::error |
( |
| ) |
|
|
inlinevirtual |
◆ indexIn() [1/2]
virtual int edbee::QtRegExpEngine::indexIn |
( |
const QString & |
str, |
|
|
int |
offset |
|
) |
| |
|
inlinevirtual |
returns the index of the regexp in the given string
- Parameters
-
str | the string to search in |
offset | the start offset of the search |
- Returns
- the index of the given match or < 0 if no match was found
Implements edbee::RegExpEngine.
◆ indexIn() [2/2]
virtual int edbee::QtRegExpEngine::indexIn |
( |
const QChar * |
str, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inlinevirtual |
Warning index in with char pointers creates a string from the string.
- Parameters
-
str | the pointer to the given string |
offset | the offset to start searching |
length | the length of the given string |
- Returns
- the index of the given match or < 0 if no match was found
Implements edbee::RegExpEngine.
◆ isValid()
virtual bool edbee::QtRegExpEngine::isValid |
( |
| ) |
|
|
inlinevirtual |
◆ lastIndexIn() [1/2]
virtual int edbee::QtRegExpEngine::lastIndexIn |
( |
const QString & |
str, |
|
|
int |
offset |
|
) |
| |
|
inlinevirtual |
Returns the last match of this regexp in the given string.
- Parameters
-
str | the string to search in |
offset | the offset to start searching from |
- Returns
- the matched index or < 0 if not found
Implements edbee::RegExpEngine.
◆ lastIndexIn() [2/2]
virtual int edbee::QtRegExpEngine::lastIndexIn |
( |
const QChar * |
str, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inlinevirtual |
Returns the last match of this regexp in the given string.
- Parameters
-
str | the string to search in |
offset | the offset to start searching from |
length | the length of the given string |
- Returns
- the matched index or < 0 if not found
Implements edbee::RegExpEngine.
◆ len()
virtual int edbee::QtRegExpEngine::len |
( |
int |
nth = 0 | ) |
const |
|
inlinevirtual |
returns the length of the nth group match
- Parameters
-
nth | the group number to return |
- Returns
- the length of the nth match
Implements edbee::RegExpEngine.
◆ pattern()
virtual QString edbee::QtRegExpEngine::pattern |
( |
| ) |
|
|
inlinevirtual |
◆ pos()
virtual int edbee::QtRegExpEngine::pos |
( |
int |
nth = 0 | ) |
const |
|
inlinevirtual |
returns the position of the nth group match
- Parameters
-
nth | the group number to return |
- Returns
- the position of the nth match
Implements edbee::RegExpEngine.
The documentation for this class was generated from the following file: