I have named a PrintWriter pOut...
If I do this:
pOut.println("Test");
Will it print Test, Test + chr(13), Test + chr(10), or Test + chr(13) + chr(10)?
To be technical it will print "Test\n" which equates to string: Test + New Line(Line Feed).
Java is a cross platform language so the New Line literal is dependent upon the platform it is being executed on.
Ok, so just to make sure:
Mac: chr(13)
Linux: chr(10)
PC: chr(13) + chr(10)
Right?
Quote from: Ryan Marcus on October 04, 2005, 05:41:34 PM
Ok, so just to make sure:
Mac: chr(13)
Linux: chr(10)
PC: chr(13) + chr(10)
Right?
Why do you need to know this? If you are trying to detect the new lines you can just compare it to it's character literal '\n'.
I believe you are correct, though I do not know what they are for Mac or *nix.