/// <summary>
/// Checks whether there is the tag at the specified position
/// in the specified sql.
/// </summary>
/// <name>The value of the Name property.</name>
/// <returns>
/// The position after the tag or -1 there is no tag at the position.
/// </returns>
internal static int MatchStart(string firstWord, string secondWord, string sql, int position)
{
#region Check the arguments
ParserBase.CheckTextAndPositionArguments(sql, position);
#endregion
if (string.Compare(sql, position, firstWord, 0, firstWord.Length, true) != 0)
{
return(-1);
}
position += firstWord.Length;
ParserBase.SkipWhiteSpace(sql, ref position);
if (position == sql.Length)
{
return(-1);
}
if (string.Compare(sql, position, secondWord, 0, secondWord.Length, true) != 0)
{
return(-1);
}
return(position + secondWord.Length);
}