|
|
|
|
|
by e12e
2110 days ago
|
|
I was going to answer gp "probably not" - but I would've been wrong. It looks to me like Java now has some of the most sophisticated in-line multi-line strings/here-documents that I'm aware of in any language. More details in: https://openjdk.java.net/jeps/378 I'm not entirely sure "most sophisticated" is entirely a good thing - but the jep looks pretty thorough at least. Ed: how does Scala do it? Java uses the indents for the closing triple-quote to determine stripping/indent + cutting trailing spaces. Ie, if my reading is correct: a = """
OK.
"""
Is "OK.\n" (even if there are any spaces after the dot). |
|