---
title: "NSMaxRange(_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nsmaxrange(_:)"
---

# NSMaxRange(_:)

Returns the sum of the location and length of the range.

## Declaration

```swift
func NSMaxRange(_ range: NSRange) -> Int
```

## Return Value

Return Value The sum of the location and length of the range—that is, range.location + range.length.

## See Also

### Managing ranges

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