Kumar,
Your questions will be more readable and will have a better chance of getting answered if you spell out words like "and", "why" and "you". Thank you for doing so in the future
I, too, find the way substr() works a little goofy as it differs from other substr() functions I have used in the past in other languages. It's just one of those idiosyncracies that you have to remember, I guess.
------------------
Junilu Lacar
Sun Certified Programmer for the Java� 2 Platform
[This message has been edited by JUNILU LACAR (edited October 20, 2001).]