public string ExecuteOperation(CharEnumerator canidate, int startIdx, int len, bool isReversed)
{
var result = new StringBuilder();
if (!isReversed && _tokenParts.Length == 1)
{
if (_tokenParts.Length == 1)
{
char tmp;
// fetch next value while
char previous = '\0';
while (canidate.MoveNext() &&
((tmp = canidate.Current) != _tokenParts[0] || SkipDueToEscapeChar(previous)))
{
result.Append(tmp);
previous = tmp;
}
}
// did they want the token included?
if (_include && (startIdx + result.Length) < len)
{
result.Append(_tokenParts);
}
}
else
{
throw new Exception("CharEnumerator is not supported for this operation type!");
}
return result.ToString();
}