3 ms·
The upper bound of the range is intended to be exclusive, while the lower bound is inclusive - basically, the same s array indexing convention. It allows the ca
by jameshart 6y ago
The upper bound of the range is intended to be exclusive, while the lower bound is inclusive - basically, the same s array indexing convention. It allows the case where fromIndex == toIndex to represent the empty range (note that this check does permit fromIndex to equal toIndex, but never to exceed it), and the number of entries in a given range is always defined by toIndex - fromIndex.