---
title: "replaceAll(queryString:options:withText:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextsearching-3wkjv/replaceall(querystring:options:withtext:)"
---

# replaceAll(queryString:options:withText:)

Informs the searchable object to replace all matching text across all searchable documents.

## Declaration

```swift
func replaceAll(queryString: String, options: UITextSearchOptions, withText: String)
```

## Parameters

- `queryString`: The string to search for and replace.
- `options`: The configurable options to use for matching words and comparing strings.
- `withText`: The string to replace the text with.

## Discussion

Discussion When supportsTextReplacement returns YES, the system calls this method during a find session to request the replacement of all text matching the query string.

## See Also

### Handling replacements

- [supportsTextReplacement](uikit/uitextsearching-3wkjv/supportstextreplacement.md)
- [replace(foundTextRange:document:withText:)](uikit/uitextsearching-3wkjv/replace(foundtextrange:document:withtext:).md)
- [shouldReplace(foundTextRange:document:withText:)](uikit/uitextsearching-3wkjv/shouldreplace(foundtextrange:document:withtext:).md)
