Function Summary | |
---|---|
CPRange | CPMakeRange(location, length) Makes a CPRange . |
CPRange | CPCopyRange(aRange) Makes a copy of a CPRange . |
CPRange | CPMakeRangeCopy(aRange) Makes a copy of a CPRange . |
CPRange | CPEmptyRange(aRange) Sets a range's length to 0. |
int | CPMaxRange(aRange) Finds the range maximum. |
BOOL | CPLocationInRange(aLocation, aRange) Determines if a number is within a specified CPRange . |
CPRange | CPUnionRange(lhsRange, rhsRange) Creates a new range with the minimum location and a length
that extends to the maximum length . |
CPRange | CPIntersectionRange(lhsRange, rhsRange) Creates a new CPRange that spans the common range of two CPRange s. |
CPString | CPStringFromRange(aRange) Returns a string describing a range. |
CPRange | CPRangeFromString(aString) Creates a CPRange from the contents of a CPString . |
Function Detail |
---|
function CPMakeRange(location, length)
CPRange
.location
- the location for new rangelength
- the length of the new rangefunction CPCopyRange(aRange)
CPRange
.aRange
- the CPRange
to copyfunction CPMakeRangeCopy(aRange)
CPRange
.aRange
- the CPRange
to copyfunction CPEmptyRange(aRange)
length
to 0.aRange
- the range to emptyfunction CPMaxRange(aRange)
location + length
)aRange
- the range to calculate a maximum fromfunction CPLocationInRange(aLocation, aRange)
CPRange
.aLocation
- the number to checkaRange
- the CPRange
to check withinYES
if aLocation/code> is within the range
function CPUnionRange(lhsRange, rhsRange)
location
and a length
that extends to the maximum length
.lhsRange
- the first CPRange
rhsRange
- the second CPRange
CPRange
function CPIntersectionRange(lhsRange, rhsRange)
CPRange
that spans the common range of two CPRange
slhsRange
- the first CPRange
rhsRange
- the second CPRange
CPRange
function CPStringFromRange(aRange)
aRange
- the range to describefunction CPRangeFromString(aString)
CPRange
from the contents of a CPString
.aString
- the string to create a CPRange
from