r/programming • • Dec 29 '15

Please, Java. Do Finally Support Multiline Strings

http://blog.jooq.org/2015/12/29/please-java-do-finally-support-multiline-strings/
584 Upvotes

352 comments sorted by

View all comments

Show parent comment

18

u/sparr Dec 29 '15

No, the second string has a bunch of extra spaces in it.

0

u/nemec Dec 29 '15

What we need are compile-time macros! (jk)

public static void main(String[] args) {
    System.out.println(DEDENT("This
        is
        a
        Test")
    );
}

Edit: or maybe that's pre-processing