string.TrimLines()

Here are the examples of the csharp api string.TrimLines() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : StringExtensions.cs
with MIT License
from SuavePirate

public static string ParseCodeTags(this string htmlText)
        {
            if (htmlText.IndexOf(ORIGINAL_PATTERN_BEGIN) < 0) return htmlText;
            var regex = new Regex(ORIGINAL_PATTERN_BEGIN);
            var regex2 = new Regex(ORIGINAL_PATTERN_END);

            htmlText = regex.Replace(htmlText, PARSED_PATTERN_BEGIN);
            htmlText = regex2.Replace(htmlText, PARSED_PATTERN_END);
            htmlText = htmlText.TrimLines();
            return htmlText;
        }

19 Source : StringExtensions.cs
with MIT License
from SuavePirate

public static string StripTags(this string html, bool stripBreaks)
        {
            if (stripBreaks)
            {
                html = html.ReplaceBreaksWithSpace();
            }
            else
            {
                html = html.ReplaceBreaks();
            }
            Regex regHtml = new Regex("<[^>]*>");
            var strippedString = regHtml.Replace(html, "");
            strippedString = strippedString.TrimLines();
            return strippedString;
        }