Answers for "c# remove empty lines from string"

C#
0

c# remove newline from string

// Remove all newlines from the 'example' string variable
string cleaned = example.Replace("n", "").Replace("r", "");
Posted by: Guest on August-04-2020
0

remove carriage returns from string c#

// Remove newlines from both sides of the 'example' string variable
string cleaned = example.Trim('r', 'n');
Posted by: Guest on August-19-2020

Code answers related to "c# remove empty lines from string"

C# Answers by Framework

Browse Popular Code Answers by Language