Skip to main content
A newer version of this page is available. .

SubDocument.ReplaceAll(String, String, SearchOptions, DocumentRange) Method

Finds all occurrences of the search string in the specified range, and replaces them with the replacement string.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v18.2.Core.dll

Declaration

int ReplaceAll(
    string textToFind,
    string replaceWith,
    SearchOptions options,
    DocumentRange range
)

Parameters

Name Type Description
textToFind String

A string specifying the search text.

replaceWith String

A string specifying the replacement text.

options SearchOptions

A SearchOptions enumeration specifying search options.

range DocumentRange

A DocumentRange object representing the range in which the search and replace is performed.

Returns

Type Description
Int32

The number of replacements made.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ReplaceAll(String, String, SearchOptions, DocumentRange) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also