File Exchange

image thumbnail


version (125 KB) by Rody Oldenhuis
Returns the newline character for this platform.


Updated 17 Aug 2015

GitHub view license on GitHub

Due to historical reasons, the newline character differs from operating system to operating system. Although most modern text tools are aware of these differences and can handle each one transparently and correctly, it is not true for all of them. MS Notepad is a notable exception; it will not display a file with UNIX line endings correctly.

So, until ISO (or similar) defines an international standard for the newline, a basic tool like this will reduce newline-related bugs, while improving both the readability and the principle of least surprise.

Cite As

Rody Oldenhuis (2020). newline (, GitHub. Retrieved .

Comments and Ratings (0)


Small doc update

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux