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

Addtional features to manipulate String and related

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0
    • core-libs
    • x86
    • windows_nt



      Name: dbT83986 Date: 02/24/99


      In my preceding mail - dated 4th Nov 98 - I forgot to add, that it would be
      very convenient to put all the "is" method(isLetter, isDigit, ...) on class Character,
      to the classes String, StringBuffer and StringTokenizer. Simply, instead of having
      a char parameter for "is" method in Character, like in Character.isWhiteSpace(char),
      one would have the index of the char in the String, StringBuffer or StringTokenizer

      To illustrate:
      public boolean isWhiteSpace(int index_of_char_in_string)
      Which returns true if the character at index index_of_char_in_string is a white space.
      public boolean isDigit(int index_of_char_in_string)
      public boolean isLetter(int index_of_char_in_string)

      But also,
      public int indexOfWhiteSpace()
      which returns the index of the first white space, if any. Of course, there should exist
      public int lastIndexOfWhiteSpace().

      In general, string manipulation is rather cubersome in Java, so have a look in C++
      Standard Template Library or in Perl to see what are extremely missing features.

      Best regards,
             Philippe d'Oreye
      (Review ID: 42045)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: