Answers for "remove new line from string c#"

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

c# regex replace all line breaks

Regex.Replace((text ?? "").Replace("'", @"'").Trim(), @"[rn]+", " ");
Posted by: Guest on July-17-2020

Code answers related to "remove new line from string c#"

C# Answers by Framework

Browse Popular Code Answers by Language