A line feed means moving one line forward. The code is \n
.
A carriage return means moving the cursor to the beginning of the line. The code is \r
.
Windows editors often still use the combination of both as \r\n
in text files. Unix uses mostly only the \n
.
The separation comes from typewriter times, when you turned the wheel to move the paper to change the line and moved the carriage to restart typing on the beginning of a line. This was two steps.
Related Posts:
- In C#, what’s the difference between \n and \r\n?
- What is lexicographical order?
- Regex not operator
- working of \n in python [duplicate]
- Regex not operator
- Extract a substring using PowerShell
- Java String new line
- Extract substring in Bash
- Regex not operator
- How do I break a string in YAML over multiple lines?
- What is the difference between \r\n, \r, and \n? [duplicate]
- string to string array conversion in java
- What is the difference between \r\n, \r, and \n? [duplicate]
- Regex how to match an optional character
- How to remove punctuation in python?
- How do I properly compare strings in C?
- How to remove .html from URL?
- How to convert an int to string in C?
- Python: TypeError: cannot concatenate ‘str’ and ‘int’ objects
- Ignoring upper case and lower case in Java
- How to replace all double quotes to single quotes using jquery?
- Convert character to ASCII numeric value in java
- What does strcmp() exactly return in C?
- Generate random string/characters in JavaScript
- What are the differences between char literals ‘\n’ and ‘\r’ in Java?
- “[ ]” vs. “[[ ]]” in Bash shell
- How to trim whitespace from a Bash variable?
- How to get the filename without the extension from a path in Python?
- sprintf like functionality in Python
- Press Enter to Continue
- C – The %x format specifier
- Lua string.format options
- n-grams in python, four, five, six grams?
- Alphabet range in Python
- How to trim whitespace from a Bash variable?
- What is the difference between ‘ and ” in JavaScript?
- Center text in fixed-width field with stream manipulators in C++
- C# – Illegal characters in path
- \n or \n in php echo not print [duplicate]
- Mips how to store user input string
- PadLeft function in T-SQL
- bash : Bad Substitution
- How to assign multiple lines string in Powershell Console
- LC-3 STR with R1 as offset
- Carriage return and Line feed… Are both required in C#?
- Removing trailing newline character from fgets() input
- Lua read beginning of a string
- How do I print my Java object without getting “SomeType@2f92e0f4”?
- How can I process each letter of text using Javascript?
- PHP to write Tab Characters inside a file?
- Haskell: Converting Int to String
- Passing string to a function in C – with or without pointers?
- Lua String replace
- Trim a string in C [duplicate]
- How to remove first character from C-string?
- What is a quick way to force CRLF in C# / .NET?
- Standard function to replace character or substring in a char array?
- Difference between char* and char** (in C)
- Extract filename and extension in Bash
- Meaning of #{ } in Ruby?
- Difference between \n and \r?
- Taking a new line using printf in java? Is %n correct?
- How to count instances of character in SQL Column
- How do I specify new lines on Python, when writing on files?
- How to convert list to string [duplicate]
- Converting integer to string in Python
- C++ — expected primary-expression before ‘ ‘
- Java string to date conversion
- How do I convert a double into a string in C++?
- How do I iterate over the words of a string?
- write() versus writelines() and concatenated strings
- Why is it string.join(list) instead of list.join(string)?
- Check if a variable is a string in JavaScript
- How to add a string in a certain position?
- This can be done without regex:
- Pythonic way to create a long multi-line string
- Writing a list to a file with Python
- Why use string::iterator rather than index?
- Best way to replace multiple characters in a string?
- Detect whether a Python string is a number or a letter
- splitting a string into an array in C++ without using vector
- Remove spaces from std::string in C++
- Delete first character of a string in Javascript
- Reversing a string in C
- How to remove the character at a given index from a string in C?
- Remove spaces from std::string in C++
- How to check if my string is equal to null?
- what is Ljava.lang.String;@
- C++ Remove punctuation from String
- Immutable class?
- jQuery – replace all instances of a character in a string [duplicate]
- Checking if a string array contains a value, and if so, getting its position
- Substring index and length must refer to a location within the string
- How do you allow spaces to be entered using scanf?
- Limit String Length
- How to print a linebreak in a python function?
- How to break lines in PowerShell?
- Cannot concatenate ‘str’ and ‘float’ objects?
- How to repeat individual characters in strings in Python
- Convert long long to string in C?