mirror of
https://github.com/sjsdfg/effective-java-3rd-chinese.git
synced 2025-04-15 22:00:42 +08:00
31 lines
638 B
Plaintext
31 lines
638 B
Plaintext
""
|
|
''
|
|
"f\"oo"
|
|
'b\'ar'
|
|
"foo\
|
|
bar"
|
|
'foo\
|
|
bar'
|
|
"foo /* comment */ bar"
|
|
'foo // bar'
|
|
'foo // bar' //comment
|
|
|
|
----------------------------------------------------
|
|
|
|
[
|
|
["string", "\"\""],
|
|
["string", "''"],
|
|
["string", "\"f\\\"oo\""],
|
|
["string", "'b\\'ar'"],
|
|
["string", "\"foo\\\r\nbar\""],
|
|
["string", "'foo\\\r\nbar'"],
|
|
["string", "\"foo /* comment */ bar\""],
|
|
["string", "'foo // bar'"],
|
|
["string", "'foo // bar'"],
|
|
["comment", "//comment"]
|
|
]
|
|
|
|
----------------------------------------------------
|
|
|
|
Checks for empty strings, single-line strings and
|
|
multi-line strings, both single-quoted and double-quoted. |