Go: Java Export file Wrapping

Source: Internet
Author: User

line feed ' \ n ' and carriage return ' \r'

As the name implies, the line break is another line, the carriage return is the beginning of the line back, so we usually write a file carriage return should be exactly called carriage return newline character

' \ n ' 10 line break (newline)
' \r' 13 return vehicle (return)


Can also be expressed as ' \x0a ' and ' \x0d '. (16 binary)

Under Windows System, the carriage return newline character is "\r\ n". But there is no "\r" symbol in Linux and other systems.

When parsing text or other format file content, often have to encounter the decision to enter the line of the place, this time should pay attention to both "\R\ n" and also determine "\ n".

You can get a line when you write a program, trim it off ' \r', and get the string you need.

Go: Java Export file Wrapping

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.