Hi,
Can someone tell me how to identify a carriage return character in string

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

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.

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.

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)

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.