- Inherits from:
- NSRange : Object
- Package:
- com.apple.yellow.foundation
An NSMutableRange is an object representing a range that can be changed. A range is a measurement of a segment of something linear, such as a byte stream. You can change an NSMutableRange's two primary values, its location and its length. The methods of NSMutableRange also enable you to alter an NSMutableRange based on its union or intersection with another NSRange object.
The main purpose for NSMutableRanges is to provide away for methods to return range values in an "out" parameter. A client creates and passes in one or more NSMutableRanges to a method and gets back changed objects when the method returns. NSMutableRanges are also useful for performance reasons; instead of creating multiple NSRanges in a loop, you can create just one NSMutableRange and reuse it.
- Constructors
- NSMutableRange
- Accessing and setting range elements
- length
- setLength
- location
- setLocation
- Transforming mutable ranges
- clone
- intersectRange
- unionRange
public NSMutableRange()
public NSMutableRange(
int location,
int length)
public NSMutableRange(NSRange aRange)
public Object clone()
public void intersectRange(NSRange aRange)
See Also: unionRange
public int length()
See Also: location
public int location()
See Also: length
public void setLength(int newLength)
See Also: setLocation
public void setLocation(int newLocation)
See Also: setLength
public void unionRange(NSRange aRange)
See Also: intersectRange