// Remove newlines from both sides of the 'example' string variable string cleaned = example.Trim(' ', ' ');