WikiFunctions.Parse.HideText.Replace C# (CSharp) Method

Replace() private method

Puts back hidden text
private Replace ( IEnumerable matches, string &articleText, List Tokens ) : void
matches IEnumerable
articleText string The wiki text of the article.
Tokens List
return void
        private void Replace(IEnumerable matches, ref string articleText, List<HideObject> Tokens)
        {
            StringBuilder sb = new StringBuilder((int)(articleText.Length * 1.1));
            int pos = 0;

            foreach (Match m in matches)
            {
                sb.Append(articleText, pos, m.Index - pos);
                string s = "⌊⌊⌊⌊" + Tokens.Count + "⌋⌋⌋⌋";
                sb.Append(s);
                pos = m.Index + m.Value.Length;
                Tokens.Add(new HideObject(s, m.Value));
            }

            sb.Append(articleText, pos, articleText.Length - pos);

            articleText = sb.ToString();
        }

Same methods

HideText::Replace ( IEnumerable matches, string &articleText ) : void