remove carriage returns from string c# code example
Example: remove carriage returns from string c#
// Remove newlines from both sides of the 'example' string variable
string cleaned = example.Trim('\r', '\n');
// Remove newlines from both sides of the 'example' string variable
string cleaned = example.Trim('\r', '\n');