---
title: NSRange
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsrange-c.struct
---

# NSRange

A structure used to describe a portion of a series, such as characters in a string or objects in an array.

## Declaration

```occ
typedef struct _NSRange { ... } NSRange;
```

## Discussion

Discussion Foundation functions that operate on ranges include the following: NSEqualRanges(_:_:) NSIntersectionRange(_:_:) NSLocationInRange(_:_:) NSMakeRange(_:_:) NSMaxRange(_:) NSRangeFromString(_:) NSStringFromRange(_:) NSUnionRange(_:_:)

## Topics

### Managing ranges

- [NSEqualRanges(_:_:)](foundation/nsequalranges(_:_:).md)
- [NSIntersectionRange(_:_:)](foundation/nsintersectionrange(_:_:).md)
- [NSLocationInRange(_:_:)](foundation/nslocationinrange(_:_:).md)
- [NSMakeRange(_:_:)](foundation/nsmakerange(_:_:).md)
- [NSMaxRange(_:)](foundation/nsmaxrange(_:).md)
- [NSRangeFromString(_:)](foundation/nsrangefromstring(_:).md)
- [NSStringFromRange(_:)](foundation/nsstringfromrange(_:).md)
- [NSUnionRange(_:_:)](foundation/nsunionrange(_:_:).md)

### Related types

- [NSRangePointer](foundation/nsrangepointer.md)
- [NSNotFound](foundation/nsnotfound-4qp9h.md)

### Instance Properties

- [length](foundation/nsrange-c.struct/length.md)
- [location](foundation/nsrange-c.struct/location.md)
