Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345257

String.stripIndent does not work as expected

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      String str = " foo bar \n";
      System.out.println(str.stripIndent());

      As user's expectation from the method name, the blank in the string head should be removed, like this
      "foo bar \n"
      but the actual result is:
      " foo bar \n"
      the blank in the str head is not removed.


            bchristi Brent Christian
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: