Created
September 24, 2016 05:37
-
-
Save zhaohangbo/027244d01d82447e10116ecdf8fb3d28 to your computer and use it in GitHub Desktop.
换行符 \r, \n, \r\n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\r = CR (Carriage Return) // Used as a new line character in Mac OS before X | |
\n = LF (Line Feed) // Used as a new line character in Unix/Mac OS X | |
\r\n = CR + LF // Used as a new line character in Windows | |
So, | |
String lines[] = String.split("\\r?\\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment