Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
CheckFromToIndex(Int32, Int32, Int32) |
Checks if the sub-range from |
CheckFromToIndex(Int64, Int64, Int64) |
Checks if the sub-range from |
Checks if the sub-range from fromIndex
(inclusive) to
toIndex
(exclusive) is within the bounds of range from 0
(inclusive) to length
(exclusive).
[Android.Runtime.Register("checkFromToIndex", "(III)I", "", ApiSince=30)]
public static int CheckFromToIndex(int fromIndex, int toIndex, int length);
[<Android.Runtime.Register("checkFromToIndex", "(III)I", "", ApiSince=30)>]
static member CheckFromToIndex : int * int * int -> int
the lower-bound (inclusive) of the sub-range
the upper-bound (exclusive) of the sub-range
the upper-bound (exclusive) the range
fromIndex
if the sub-range within bounds of the range
Checks if the sub-range from fromIndex
(inclusive) to toIndex
(exclusive) is within the bounds of range from 0
(inclusive) to length
(exclusive).
The sub-range is defined to be out of bounds if any of the following inequalities is true: <ul> <li>fromIndex < 0
</li> <li>fromIndex > toIndex
</li> <li>toIndex > length
</li> <li>length < 0
, which is implied from the former inequalities</li> </ul>
Added in 9.
Java documentation for java.util.Objects.checkFromToIndex(int, int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Checks if the sub-range from fromIndex
(inclusive) to
toIndex
(exclusive) is within the bounds of range from 0
(inclusive) to length
(exclusive).
[Android.Runtime.Register("checkFromToIndex", "(JJJ)J", "", ApiSince=34)]
public static long CheckFromToIndex(long fromIndex, long toIndex, long length);
[<Android.Runtime.Register("checkFromToIndex", "(JJJ)J", "", ApiSince=34)>]
static member CheckFromToIndex : int64 * int64 * int64 -> int64
the lower-bound (inclusive) of the sub-range
the upper-bound (exclusive) of the sub-range
the upper-bound (exclusive) the range
fromIndex
if the sub-range within bounds of the range
Checks if the sub-range from fromIndex
(inclusive) to toIndex
(exclusive) is within the bounds of range from 0
(inclusive) to length
(exclusive).
The sub-range is defined to be out of bounds if any of the following inequalities is true: <ul> <li>fromIndex < 0
</li> <li>fromIndex > toIndex
</li> <li>toIndex > length
</li> <li>length < 0
, which is implied from the former inequalities</li> </ul>
Added in 16.
Java documentation for java.util.Objects.checkFromToIndex(long, long, long)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in