You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/mimelib/doc/boyermor.html

58 lines
1.8 KiB

<HTML>
<HEAD>
<TITLE> DwBoyerMoore Man Page </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>
<FONT COLOR="navy"> NAME </FONT>
</H2>
<P>
DwBoyerMoore -- Class for executing Boyer-Moore string search algorithm
<H2>
<FONT COLOR="navy"> SYNOPSIS </FONT>
</H2>
<PRE>class DW_EXPORT DwBoyerMoore {
public:
<A HREF="boyermor.html#DwBoyerMoore">DwBoyerMoore</A>(const char* aCstr);
<A HREF="boyermor.html#DwBoyerMoore">DwBoyerMoore</A>(const DwString&amp; aStr);
virtual ~DwBoyerMoore();
void <A HREF="boyermor.html#Assign">Assign</A>(const char* aCstr);
void <A HREF="boyermor.html#Assign">Assign</A>(const DwString&amp; aStr);
size_t <A HREF="boyermor.html#FindIn">FindIn</A>(const DwString&amp; aStr, size_t aPos);
};
</PRE>
<H2>
<FONT COLOR="navy"> DESCRIPTION </FONT>
</H2>
<P>
<B><TT>DwBoyerMoore</TT></B> implements the Boyer-Moore algorithm for searching
for a string. The Boyer-Moore algorithm is fast, but requires a bit of start-up
overhead compared to a brute force algorithm.
<H2>
<FONT COLOR="navy"> Public Member Functions </FONT>
</H2>
<P>
<FONT COLOR="teal"><B> <A NAME="DwBoyerMoore">DwBoyerMoore</A>(const char*
aCstr) <BR>
DwBoyerMoore(const DwString&amp; aStr) </B></FONT>
<P>
Constructs a <B><TT>DwBoyerMoore</TT></B> object for searching for a particular
string.
<P>
<FONT COLOR="teal"><B> void <A NAME="Assign">Assign</A>(const char* aCstr)
<BR>
void Assign(const DwString&amp; aStr) </B></FONT>
<P>
Sets the string to search for.
<P>
<FONT COLOR="teal"><B> size_t <A NAME="FindIn">FindIn</A>(const DwString&amp;
aStr, size_t aPos) </B></FONT>
<P>
Searches for the search string in <B><TT>aStr</TT></B> starting at position
<B><TT>aPos</TT></B>. If found, the function returns the first position in
<B><TT>aStr</TT></B> where the search string was found. If not found, the
function returns <B><TT>DwString::npos</TT></B>.
</BODY></HTML>