Skip to content

ChangeLineEndings

Change the line endings in a string.

Declaration

Source position: csvreadwrite.pp line 195

function ChangeLineEndings(const AString: string; 
                          const ALineEnding: string) : string;

Arguments

Name Description
AString The string to transform.
ALineEnding LineEnding to use in the returned string.

Function result

aString with all possible line ending characters replaced with aLineEnding.

Description

ChangeLineEndings is a utility function which changes the line ending characters CR, CR/LF and LF in Astring to the specified line ending aLineEnding. It returns the transformed string.