test/Microsoft.OpenAPI.OData.Reader.Tests/Common/StringExtensions.cs
/// <summary>
/// Change the input string's line breaks
/// </summary>
/// <param name="rawString">The raw input string</param>
/// <param name="newLine">The new line break.</param>
/// <returns>The changed string.</returns>
Change the input string's line breaks
Change the input string ' s line breaks
public static string ChangeLineBreaks(this string rawString, string newLine = "\n")
        {
            Assert.NotNull(rawString);
            rawString = rawString.Trim('\n', '\r');
            rawString = rawString.Replace("\r\n", newLine);
            return rawString;
        }
public static string ChangeLineBreaks ( this string rawString , string newLine = " \n " ) { Assert . NotNull ( rawString ) ; rawString = rawString . Trim ( ' \n ' , ' \r ' ) ; rawString = rawString . Replace ( " \r \n " , newLine ) ; return rawString ; }
Change the input string's line breaks
Change the input string ' s line breaks
The changed string.
The changed string .
string
this
newLine
string
The new line break.
The new line break .
rawString
The raw input string
The raw input string