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

new String convenience methods isEmpty() and contains(String)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-libs
    • None
    • b15
    • generic
    • generic

      The java.lang.String class would benefit from a couple of very simple
      convenience methods that capture two very common use cases:

          boolean isEmpty() { return length() == 0; }
          boolean contains(String s) { return indexOf(s) >= 0; }
      ###@###.### 11/2/04 00:10 GMT

            iris Iris Clark
            iris Iris Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: