@LINEENDS — Reports the line-end characters used in a text file.

Syntax:
%@LINEENDS[filename,n]

filenamethe file to scan
nwhat to report:
     1: the number of lines ending in CR/LF pairs
     2: the number of lines ending in LF/CR pairs
     3: the number of lines ending in CR not followed by LF
     4: the number of lines ending in LF not followed by CR
     5: the number of lines ending in NEL
     10: the total number of line-end sequences in the file

If n is zero or not present, @LINEENDS returns a string describing the file’s format:

EmptyThe file contains no data.
NoneNo line-end characters were found.
CR/LFThe file uses CR/LF line ends.
LF/CRThe file uses LF/CR line ends. (Who does this?)
CRThe file uses CR line ends.
LFThe file uses LF line ends.
NELThe file uses NEL line ends.
MixedThe file uses more than one line-end sequence.
ERRORThere was an error reading from the file.

See also: the @TEXTENCODING and @TEXTFORMAT functions.