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

# init(attributedString:)

Creates a new attributed string from the contents of another attributed string.

## Declaration

```swift
init(attributedString attrStr: NSAttributedString)
```

## Parameters

- `attrStr`: An attributed string.

## Return Value

Return Value An NSAttributedString object initialized with the characters and attributes of attrStr.

## See Also

### Related Documentation

- [init(RTF:documentAttributes:)](foundation/nsattributedstring/init(rtf:documentattributes:).md)

### Creating from another string

- [init(string:)](foundation/nsattributedstring/init(string:).md)
- [init(string:attributes:)](foundation/nsattributedstring/init(string:attributes:).md)
