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

RFE: Please add indexOf methods to StringBuffer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • core-libs
    • generic
    • generic



      Name: stC104175 Date: 03/24/2000


      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)

      The StringBuffer class is missing many methods from the String class. This is
      frustrating to those of us to change code that works with Strings to code that
      works with StringBuffers for efficiency reasons. The methods from String I miss
      most are the four indexOf() methods:
        int indexOf(int ch)
        int indexOf(int ch, int fromIndex)
        int indexOf(String str)
        int indexOf(String str, int fromIndex)
      If these methods could be added to StringBuffer (either with identical
      signatures, or with the "ch" arguments changed to char as suggested in Bug ID
      4075078) it would make my code much cleaner and efficient.
      (Review ID: 102839)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            stompkinsunw Sean Tompkins (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: