The onig regexp-engine.
More...
|
| OnigRegExpEngine (const QString &pattern, bool caseSensitive, RegExp::Syntax syntax) |
| Constructs the OnigRegExp engine. More...
|
|
virtual | ~OnigRegExpEngine () |
| destructs the regular expression engine More...
|
|
virtual QString | pattern () |
| returns the pattern used More...
|
|
virtual bool | isValid () |
| returns true if the supplied regular expression was valid More...
|
|
virtual QString | error () |
| returns the error message More...
|
|
int | indexIn (const QChar *charPtr, int offset, int length, bool reverse) |
| returns the index of the given QChar array in the given text More...
|
|
virtual int | indexIn (const QString &str, int offset) |
| returns the position of the given match or returns an error code More...
|
|
virtual int | indexIn (const QChar *charPtr, int offset, int length) |
| returns the position of the given match or returns an error code More...
|
|
virtual int | lastIndexIn (const QString &str, int offset) |
| returns the last index of the given string More...
|
|
virtual int | lastIndexIn (const QChar *str, int offset, int length) |
| returns the last index of the given string More...
|
|
virtual int | pos (int nth) const |
| returns the offset of the given match More...
|
|
virtual int | len (int nth) const |
| returns the length of the nth match More...
|
|
virtual QString | cap (int nth=0) const |
| returns the capture at the given index More...
|
|
virtual | ~RegExpEngine () |
|
◆ OnigRegExpEngine()
edbee::OnigRegExpEngine::OnigRegExpEngine |
( |
const QString & |
pattern, |
|
|
bool |
caseSensitive, |
|
|
RegExp::Syntax |
syntax |
|
) |
| |
|
inline |
Constructs the OnigRegExp engine.
- Parameters
-
pattern | the regular expression pattern |
caseSensitive | is the regexp case senstitive |
syntax | the syntax to use |
◆ ~OnigRegExpEngine()
virtual edbee::OnigRegExpEngine::~OnigRegExpEngine |
( |
| ) |
|
|
inlinevirtual |
destructs the regular expression engine
◆ cap()
virtual QString edbee::OnigRegExpEngine::cap |
( |
int |
nth = 0 | ) |
const |
|
inlinevirtual |
returns the capture at the given index
- Parameters
-
nth | the position of the match |
- Returns
- the match ath the given position
Implements edbee::RegExpEngine.
◆ error()
virtual QString edbee::OnigRegExpEngine::error |
( |
| ) |
|
|
inlinevirtual |
◆ indexIn() [1/3]
int edbee::OnigRegExpEngine::indexIn |
( |
const QChar * |
charPtr, |
|
|
int |
offset, |
|
|
int |
length, |
|
|
bool |
reverse |
|
) |
| |
|
inline |
returns the index of the given QChar array in the given text
- Parameters
-
charPtr | the pointer to the string data |
offset | the offset to start searching |
length | the length of the string data |
reverse | should the search be reversed? |
◆ indexIn() [2/3]
virtual int edbee::OnigRegExpEngine::indexIn |
( |
const QString & |
str, |
|
|
int |
offset |
|
) |
| |
|
inlinevirtual |
returns the position of the given match or returns an error code
- Parameters
-
str | the string to the search in |
offset | the offset in the string to start the search |
- Returns
- the position of the given match (-1 if not found, -2 on error)
Implements edbee::RegExpEngine.
◆ indexIn() [3/3]
virtual int edbee::OnigRegExpEngine::indexIn |
( |
const QChar * |
charPtr, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inlinevirtual |
returns the position of the given match or returns an error code
- Parameters
-
str | the pointer to the line |
offset | the offset to start searching |
length | the total length of the str pointer |
- Returns
- the position of the given match (-1 if not found, -2 on error)
Implements edbee::RegExpEngine.
◆ isValid()
virtual bool edbee::OnigRegExpEngine::isValid |
( |
| ) |
|
|
inlinevirtual |
◆ lastIndexIn() [1/2]
virtual int edbee::OnigRegExpEngine::lastIndexIn |
( |
const QString & |
str, |
|
|
int |
offset |
|
) |
| |
|
inlinevirtual |
returns the last index of the given string
- Parameters
-
str | the string to search in |
offset | the offset of the start of the search |
- Returns
- the index of the match (-1 if not found, -2 on error)
Implements edbee::RegExpEngine.
◆ lastIndexIn() [2/2]
virtual int edbee::OnigRegExpEngine::lastIndexIn |
( |
const QChar * |
str, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inlinevirtual |
returns the last index of the given string
- Parameters
-
str | the string to search in |
offset | the offset of the start of the search |
length | the length of the supplied string data |
- Returns
- the index of the match (-1 if not found, -2 on error)
Implements edbee::RegExpEngine.
◆ len()
virtual int edbee::OnigRegExpEngine::len |
( |
int |
nth | ) |
const |
|
inlinevirtual |
◆ pattern()
virtual QString edbee::OnigRegExpEngine::pattern |
( |
| ) |
|
|
inlinevirtual |
◆ pos()
virtual int edbee::OnigRegExpEngine::pos |
( |
int |
nth | ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file: