honeybee
Aug 6th, 2001, 03:28 AM
Why does the substring method of the String object behave so strangely?
It takes the starting number and the one next to the ending number for extracting the string. For e.g.
String MyString=new String("honeybee");
To extract "bee" from this, I have to use:
String YourString = MyString.substring(5, 8);
Why doesn't the substring behave like the MID/SubString functions in all other programming languages??
.
It takes the starting number and the one next to the ending number for extracting the string. For e.g.
String MyString=new String("honeybee");
To extract "bee" from this, I have to use:
String YourString = MyString.substring(5, 8);
Why doesn't the substring behave like the MID/SubString functions in all other programming languages??
.