---
title: "init(range:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsvalue/init(range:)"
---

# init(range:)

Creates a new value object containing the specified Foundation range structure.

## Declaration

```swift
init(range: NSRange)
```

## Parameters

- `range`: The value for the new object.

## Return Value

Return Value A new value object that contains the range information.

## See Also

### Working with Range Values

- [rangeValue](foundation/nsvalue/rangevalue.md)
