I am having a heck of a time replacing a newline character in a string inside on Azure Function. This code runs fine as console app
string str = "24\n";
str = str.Replace("\r", string.Empty).Replace("\n", string.Empty).Replace(System.Environment.NewLine, string.Empty)
But inside of Azure Function the \n does not go away. Are there alternative methods to replacing a newline other than System.Environment.NewLine?