---
title: "removeCharacters(in:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutablecharacterset/removecharacters(in:)-762gt"
---

# removeCharacters(in:)

Removes from the receiver the characters in a given string.

## Declaration

```swift
func removeCharacters(in aString: String)
```

## Parameters

- `aString`: The characters to remove from the receiver.

## Discussion

Discussion This method has no effect if aString is empty.

## See Also

### Adding and Removing Characters

- [addCharacters(in:)](foundation/nsmutablecharacterset/addcharacters(in:)-4ppyw.md)
- [removeCharacters(in:)](foundation/nsmutablecharacterset/removecharacters(in:)-70nqp.md)
- [addCharacters(in:)](foundation/nsmutablecharacterset/addcharacters(in:)-7q02.md)
