Compound list File list Header files Compound Members File Members
QaRegExpRange Class Reference
Holds a start and end offset for a given regexp match. More...
#include <qaregexprange.hpp>
List of all members.
Public Members
Detailed Description
Holds a start and end offset for a given regexp match.
A simple tool class for keeping a start and end offset and for extracting the correct substring from a given string.
It also makes sure the start offset is smaller than the end offset, they are swapped if needed.
Member Function Documentation
QaRegExpRange::QaRegExpRange()
Creates a range with start and end equal to -1
QaRegExpRange::QaRegExpRange( int soffs, int eoffs )
Creates a range with given start end end offset.
QaRegExpRange::~QaRegExpRange()
int QaRegExpRange::start() const
-
Returns:
-
The start offset.
int QaRegExpRange::end() const
int QaRegExpRange::length() const
-
Returns:
-
The length of the offset, 0 means start and end are equal.
void QaRegExpRange::setStart( int s )
Sets the start offset, if it is larger than the end offset it used as end
and the previous end is used as start.
void QaRegExpRange::setEnd( int e )
Sets the end offset, if it is smaller than the start offset it used as start
and the previous start is used as end.
QString QaRegExpRange::stringRange( const QString &s ) const
-
Returns:
-
The substring of the given string.
QaRegExpRange& QaRegExpRange::operator +=( int i )
Moves both start and end offset by i places.
QaRegExpRange& QaRegExpRange::operator -=( int i )
Moves both start and end offset by i places.
The documentation for this class was generated from the following files:
Generated at Mon Aug 16 02:11:02 1999 for QaRegExp by
written by Dimitri van Heesch, © 1997-1998