If you look at the getChars entry in the Java 2 API docs, you'll see that the endIndex you pass in refers to the index after the last character you want to copy, rather than the actual index of the last character, as you are assuming.
posted 16 years ago
Sorry! I should've looked at the getChars function definition not just the function declaration in the javadoc before posting such a question. Thanks Felix for your help.
Hey! Wanna see my flashlight? It looks like this tiny ad: