Normalizes the length of a range within a longer array-like structure, such that it does not exceed the end of that structure. Effectively ensures that it is within [0, limit - start]. You can use a negative start index to count back from the end.
If start is omitted, 0 is assumed.
normalizeRangeStart and normalizeRangeEnd.
Normalizes the length of a range within a longer array-like structure, such that it does not exceed the end of that structure. Effectively ensures that it is within [0, limit - start]. You can use a negative start index to count back from the end.
If start is omitted, 0 is assumed.