4
Contributors
5
Replies
9
Views
9 Years
Discussion Span
Last Post by Ezzaral
0

Just like you would identify any other character in a string: look for "\r\n" or "\n" (system dependent).

0

I believe there's a static variable or system propery that holds the proper return character for the system the vm is running on. Sorry I can't remember exactly what it was.

0

Yes, System.getProperty("line.separator") can be used for the system you are running on, but if you are reading files from external sources the linefeeds may differ from your own.

0

You people are getting confused between newline and carriage returns. A carriage return is just a carriage return and is always '\r'.

It's the 'newline' character which is different on different systems. (\r, \n, \r\n)

0

You people are getting confused between newline and carriage returns. A carriage return is just a carriage return and is always '\r'.

It's the 'newline' character which is different on different systems. (\r, \n, \r\n)

Yes, agreed. I just figured he was asking in a more general sense about line breaking characters.

This question has already been answered. Start a new discussion instead.
Be sure to adhere to our posting rules.