\HeaderA{matchPattern}{String searching functions}{matchPattern}
\aliasA{countPattern}{matchPattern}{countPattern}
\aliasA{countPattern,ANY,BString-method}{matchPattern}{countPattern,ANY,BString.Rdash.method}
\aliasA{countPattern,ANY,BStringViews-method}{matchPattern}{countPattern,ANY,BStringViews.Rdash.method}
\aliasA{countPattern,ANY,character-method}{matchPattern}{countPattern,ANY,character.Rdash.method}
\aliasA{matchDNAPattern}{matchPattern}{matchDNAPattern}
\aliasA{matchPattern,ANY,BString-method}{matchPattern}{matchPattern,ANY,BString.Rdash.method}
\aliasA{matchPattern,ANY,BStringViews-method}{matchPattern}{matchPattern,ANY,BStringViews.Rdash.method}
\aliasA{matchPattern,ANY,character-method}{matchPattern}{matchPattern,ANY,character.Rdash.method}
\aliasA{mismatch}{matchPattern}{mismatch}
\aliasA{mismatch,ANY,BStringViews-method}{matchPattern}{mismatch,ANY,BStringViews.Rdash.method}
\keyword{methods}{matchPattern}
\begin{Description}\relax
Generic that finds all matches of a pattern in a BString.
Currently only the ``shift-or'' algorithm is available.
\end{Description}
\begin{Usage}
\begin{verbatim}
  matchPattern(pattern, subject, algorithm="shift-or", mismatch=0, fixed=NA)
  countPattern(pattern, subject, algorithm="shift-or", mismatch=0, fixed=NA)
  mismatch(pattern, x, fixed=NA)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pattern}] The pattern string.

\item[\code{subject}] A \LinkA{BString}{BString} (or \LinkA{DNAString}{DNAString} or \LinkA{RNAString}{RNAString}) object
containing the subject string.

\item[\code{algorithm}] One of the following: \code{"boyer-moore"}, \code{"forward-search"}
or \code{"shift-or"} (currently, only \code{"shift-or"} is available).

\item[\code{mismatch}] The number of mismatches allowed. If non-zero a fuzzy string searching
algorithm is used for matching.

\item[\code{fixed}] A logical.  If \code{TRUE}, \code{pattern} is a string to be matched as is.

\item[\code{x}] A \LinkA{BStringViews}{BStringViews} object (typically, one returned
by code{matchPattern(pattern, subject)}).

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\end{Details}
\begin{Value}
\end{Value}
\begin{Author}\relax
H. Pages
\end{Author}
\begin{SeeAlso}\relax
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
\end{ExampleCode}
\end{Examples}


