Hello, I'm trying to remove multiple carriage returns and linefeeds from a string. However my code can't do this, unlikely it could, in my other application. Here's my code:
Code:str = str.Replace(ControlChars.Lf, ControlChars.NewLine) str = str.Replace(ControlChars.Cr, ControlChars.NewLine) str = str.Replace(ControlChars.CrLf, ControlChars.NewLine) str = str.Replace(ControlChars.NewLine & ControlChars.NewLine & ControlChars.NewLine, ControlChars.NewLine) str = str.Replace(ControlChars.NewLine & ControlChars.NewLine, ControlChars.NewLine)




Reply With Quote
