public Find ( |
||
r | ||
findExpression | ||
searchUp | bool | |
Результат |
public Range Find(Range r, Regex findExpression, bool searchUp)
{
// Single line and Multi Line in RegExp doesn't really effect
// whether or not a match will include newline charaters. This
// means we can't do a line by line search. We have to search
// the entire range becuase it could potentially match the
// entire range.
Match m = findExpression.Match(r.Text);
if (!m.Success)
return null;
if (searchUp)
{
// Since we can't search backwards with RegExp we
// have to search the entire string and return the
// last match. Not the most efficient way of doing
// things but it works.
Range range = null;
while (m.Success)
{
range = new Range(r.Start + m.Index, r.Start + m.Index + m.Length, Scintilla);
m = m.NextMatch();
}
return range;
}
return new Range(r.Start + m.Index, r.Start + m.Index + m.Length, Scintilla);
}
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( |
|
FindReplace::Find ( int startPos, int endPos, |
|
FindReplace::Find ( int startPos, int endPos, |
|
FindReplace::Find ( int startPos, int endPos, string searchString, SearchFlags flags ) : |
|
FindReplace::Find ( string searchString ) : |
|
FindReplace::Find ( string searchString, SearchFlags searchflags ) : |
|
FindReplace::Find ( string searchString, SearchFlags searchflags, bool searchUp ) : |
|
FindReplace::Find ( string searchString, bool searchUp ) : |