Programmatically Remove Line Breaks (#13#10) From a Delphi String
Saturday March 1, 2008
in Delphi TIPS :: If you have a 'large' string, for example coming from a TMemo control, one that includes carriage-return + line-feed combinations you might need to replace the "CRLF" with an empty space...
Read the full article to learn how to Programmatically Remove Line Breaks (#13#10) From a Delphi String.
Related:


Comments
Wouldn’t this code replace every instance of “CRLF” with an instance of ” ” (double-space)? Perhaps not a perfect solution in all instances?
SysUtils…
aValue := StringReplace(StringReplace(aValue, ‘#10′, ‘’, [rfReplaceAll]), ‘#13′, ‘’, [rfReplaceAll]);