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)
======================================================================