Re:JDK 15
by chadrs on Tuesday September 15, 2020 @01:15PM
(#24483781)
At the string literal level doesn't do anything, but the standard library adds an extension method to string called `stripMargin`. This has some nice examples https://www.oreilly.com/library/view/scala-cookbook/97814493...
[ Parent
| on HN ]
The indentation is removed at compile time, per the JLS: https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.htm...
> Incidental white space is removed, as if by execution of String.stripIndent on the characters resulting from step 1.
The new stripIndent() method is provided as a convenience to developers.
Re:JDK 15
by Nullabillity on Tuesday September 15, 2020 @01:34PM
(#24484086)
That's for Java, the parent is talking about Scala.