HtmlAgilityPack.HtmlNode.IsOverlappedClosingElement C# (CSharp) Method

IsOverlappedClosingElement() public static method

Determines if a text corresponds to the closing tag of an node that can be kept overlapped.
public static IsOverlappedClosingElement ( string text ) : bool
text string The text to check. May not be null.
return bool
		public static bool IsOverlappedClosingElement(string text)
		{
			if (text == null)
			{
				throw new ArgumentNullException("text");
			}
			// min is </x>: 4
			if (text.Length <= 4)
				return false;

			if ((text[0] != '<') ||
				(text[text.Length - 1] != '>') ||
				(text[1] != '/'))
				return false;

			string name = text.Substring(2, text.Length - 3);
			return CanOverlapElement(name);
		}