---
title: "filter(runBoundaries:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/attributecontainer/filter(runboundaries:)"
---

# filter(runBoundaries:)

Returns a copy of the attribute container with only attributes that have the provided run boundaries.

## Declaration

```swift
func filter(runBoundaries: AttributedString.AttributeRunBoundaries?) -> AttributeContainer
```

## Parameters

- `runBoundaries`: The required runBoundaries value of the filtered attributes. If nil is provided, only attributes not bound to any specific boundary will be returned.

## Return Value

Return Value A copy of the attribute container with only attributes whose runBoundaries property matches the provided value.
