C# Class Pchp.Library.PerlRegex.RegexBoyerMoore

Exibir arquivo Open project: iolevel/peachpie Class Usage Examples

Public Methods

Method Description
Dump ( string indent ) : string
ToString ( ) : string

Used when dumping for debugging.

Private Methods

Method Description
IsMatch ( string text, int index, int beglimit, int endlimit ) : bool

When a regex is anchored, we can do a quick IsMatch test instead of a Scan

MatchPattern ( string text, int index ) : bool
RegexBoyerMoore ( string pattern, bool caseInsensitive, bool rightToLeft, CultureInfo culture ) : System

Constructs a Boyer-Moore state machine for searching for the string pattern. The string must not be zero-length.

Scan ( string text, int index, int beglimit, int endlimit ) : int

Scan uses the Boyer-Moore algorithm to find the first occurrence of the specified string within text, beginning at index, and constrained within beglimit and endlimit. The direction and case-sensitivity of the match is determined by the arguments to the RegexBoyerMoore constructor.

Method Details

Dump() public method

public Dump ( string indent ) : string
indent string
return string

ToString() public method

Used when dumping for debugging.
public ToString ( ) : string
return string