WikiFunctions.Word.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            return m_ToString;
        }

Usage Example

Beispiel #1
0
        private static void WhitespaceDiff(StringBuilder res, Word left, Word right)
        {
            if (left.Whitespace == right.Whitespace)
            {
                res.Append(HttpUtility.HtmlEncode(right.ToString()));
            }
            else
            {
                res.Append(HttpUtility.HtmlEncode(right.TheWord));
                char[] leftChars  = left.Whitespace.ToCharArray();
                char[] rightChars = right.Whitespace.ToCharArray();

                Diff diff = new Diff(leftChars, rightChars, Word.Comparer);
                foreach (Diff.Hunk h in diff)
                {
                    if (h.Same)
                    {
                        res.Append(rightChars, h.Right.Start, h.Right.Count);
                    }
                    else
                    {
                        res.Append("<span class='diffchange'>");
                        res.Append('\x00A0', h.Right.Count); // replace spaces with NBSPs to make 'em visible
                        res.Append("</span>");
                    }
                }
            }
        }
All Usage Examples Of WikiFunctions.Word::ToString