This is an internal function (private) that is not part of the API, although there are many similar functions that take a from/to index.
Programming languages only have a convenient relation to English. Programmers will write "toIndex" and actually mean "uptoButNotIncludingIndex". The name acts as a reminder of what it is, but the real details are in the specification of the function (the javadoc) that comes with every public API in Java.
Anyway, I've found it is quite common to have the "end" index mean upto but not including the end index when dealing with 0 based lists. This is because a very common case, where you want to do something all the way to the end of the list, you can just use the "length" of such a list as the end index without having to substract one from it.