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

(str) String.trim method should accept a list of characters to trim

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE REQUEST :
      Required method is:
      (class String)
      public String trim(String chars)



      JUSTIFICATION :
      Often it is required to trim multiple characters from strings. In TCL, for example, the string trim proc takes a list of characters to trim which is very convenient.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      For example, if a String x equals " \'test\' ", the call
      x.trim(" \\'")
      should return "test".

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: