Tools.h++ Class Reference

Table Of Contents
Public Member Functions
size_t
index(const RWCString& str,size_t* len, size_t start=0) const;
Returns the index of the first instance in the string str that matches the regular expression
compiled in self, or RW_NPOS if there is no such match. The search starts at index start.
The length of the matching pattern is returned in the variable pointed to by len. If an
invalid regular expression is used for the search, an exception of type RWInternalErr
will be thrown. Note that this member function is relatively clumsy to use -- class
RWCString offers a better interface to regular expression searches.
statVal
status();
Returns the status of the regular expression and resets status to OK:
statVal Meaning
RWCRegexp::OK No errors
RWCRegexp::ILLEGAL Pattern was illegal
RWCRegexp::TOOLONG Pattern exceeded maximum length