# `GSTextStorage replaceCharactersInRange:withString:`

*Instance Method*

## Declaration

```swift
func replaceCharacters(in aRange: NSRange, withString aString: Any!)
```

```objc
- (void) replaceCharactersInRange:(NSRange) aRange withString:(id) aString;
```

```python
replaceCharactersInRange_withString_(aRange: NSRange, aString: object)
```

## Discussion

> **Note**
> It is preferable to send this message to GSGlyphEditView instead as it now handles the selection.

