---
title: "deleteCharacters(in:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutableattributedstring/deletecharacters(in:)"
---

# deleteCharacters(in:)

Deletes the characters in the given range along with their associated attributes.

## Declaration

```swift
func deleteCharacters(in range: NSRange)
```

## Parameters

- `range`: A range specifying the characters to delete.

## Discussion

Discussion Raises an rangeException if any part of range lies beyond the end of the receiver’s characters.

## See Also

### Related Documentation

- [replaceCharacters(in:with:)](foundation/nsmutableattributedstring/replacecharacters(in:with:)-1uaw7.md)

### Changing Characters

- [replaceCharacters(in:with:)](foundation/nsmutableattributedstring/replacecharacters(in:with:)-6oq9r.md)
