---
title: "init(_:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsattributedstring/init(_:)"
---

# init(_:)

Creates a reference-type attributed string from the specified value-type attributed string.

## Declaration

```swift
convenience init(_ attrStr: AttributedString)
```

## Parameters

- `attrStr`: The value type attributed string that provides the text and attributes of the new object.

## Discussion

Discussion This initializer includes all attribute scopes defined by the SDK, such as AttributeScopes.FoundationAttributes, AttributeScopes.SwiftUIAttributes, and AttributeScopes.AccessibilityAttributes. To use third-party attribute scopes, use the initializers init(_:including:) or init(_:including:).

## See Also

### Creating a formatted string

- [init(_:including:)](foundation/nsattributedstring/init(_:including:)-9gogq.md)
- [init(_:including:)](foundation/nsattributedstring/init(_:including:)-8iy4i.md)
