My query is whether System.getProperty("line.separator")
and "\n"
for Android network operations are same.
I mean to say. I will be getting line separated response from some server and so which is better to use System.getProperty("line.separator")
or "\n"
?
reffred Carriage returns/line breaks with \n in strings in Android but still not sure with network operations.
If you get line separated responses use BufferedReader.readLine()
to read each line and then use System.getProperty("line.separator")
if you want to insert the newline back into the String.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With