WikiFunctions.Tools.GetZerothSection C# (CSharp) Method

GetZerothSection() public static method

Matches the first section of an article, if the article has sections, else the whole article
public static GetZerothSection ( string articleText ) : string
articleText string
return string
        public static string GetZerothSection(string articleText)
        {
            Match m = HeadingStart.Match(articleText);

            if (m.Success)
                return articleText.Substring(0, m.Index);

            return articleText;
        }
Tools