Objects.CheckFromIndexSize Method
Definition
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.
Overloads
CheckFromIndexSize(Int32, Int32, Int32) |
Checks if the sub-range from |
CheckFromIndexSize(Int64, Int64, Int64) |
Checks if the sub-range from |
CheckFromIndexSize(Int32, Int32, Int32)
Checks if the sub-range from fromIndex
(inclusive) to
fromIndex + size
(exclusive) is within the bounds of range from
0
(inclusive) to length
(exclusive).
[Android.Runtime.Register("checkFromIndexSize", "(III)I", "", ApiSince=30)]
public static int CheckFromIndexSize (int fromIndex, int size, int length);
[<Android.Runtime.Register("checkFromIndexSize", "(III)I", "", ApiSince=30)>]
static member CheckFromIndexSize : int * int * int -> int
Parameters
- fromIndex
- Int32
the lower-bound (inclusive) of the sub-interval
- size
- Int32
the size of the sub-range
- length
- Int32
the upper-bound (exclusive) of the range
Returns
fromIndex
if the sub-range within bounds of the range
- Attributes
Remarks
Checks if the sub-range from fromIndex
(inclusive) to fromIndex + size
(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>size < 0
</li> <li>fromIndex + size > length
, taking into account integer overflow</li> <li>length < 0
, which is implied from the former inequalities</li> </ul>
Added in 9.
Java documentation for java.util.Objects.checkFromIndexSize(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.
Applies to
CheckFromIndexSize(Int64, Int64, Int64)
Checks if the sub-range from fromIndex
(inclusive) to
fromIndex + size
(exclusive) is within the bounds of range from
0
(inclusive) to length
(exclusive).
[Android.Runtime.Register("checkFromIndexSize", "(JJJ)J", "", ApiSince=34)]
public static long CheckFromIndexSize (long fromIndex, long size, long length);
[<Android.Runtime.Register("checkFromIndexSize", "(JJJ)J", "", ApiSince=34)>]
static member CheckFromIndexSize : int64 * int64 * int64 -> int64
Parameters
- fromIndex
- Int64
the lower-bound (inclusive) of the sub-interval
- size
- Int64
the size of the sub-range
- length
- Int64
the upper-bound (exclusive) of the range
Returns
fromIndex
if the sub-range within bounds of the range
- Attributes
Remarks
Checks if the sub-range from fromIndex
(inclusive) to fromIndex + size
(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>size < 0
</li> <li>fromIndex + size > length
, taking into account integer overflow</li> <li>length < 0
, which is implied from the former inequalities</li> </ul>
Added in 16.
Java documentation for java.util.Objects.checkFromIndexSize(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.