TextSearchOptions Class
Contains options for searching text.
Declaration
public class TextSearchOptions extends JavaObject
Remarks
The following code snippet uses TextSearchOptions to replace all occurrences of a text fragment with case-insensitive matching:
import com.devexpress.docs.office.*;
//...
// Replace text using case-insensitive matching.
TextSearchOptions options = new TextSearchOptions();
options.setMatchCase(false);
shape.getTextArea().replaceText("old text", "new text", options);
For more information on how to work with text in shapes, refer to the following help topic: Work with Text in Shapes.
Inherited Members
Inheritance
TextSearchOptions()
Initializes a new instance of the TextSearchOptions class.
Declaration
public TextSearchOptions()
Methods
getMatchCase() Method
Indicates whether the search is case-sensitive.
Declaration
public boolean getMatchCase()
Returns
| Type | Description |
|---|---|
| boolean |
|
Remarks
Pass true to the setMatchCase(boolean value) method to find text portions with matching capitalization. For example, searching for “myString” matches the value “myString”, but not “mystring”.
getWholeWordOnly() Method
Indicates whether or not to take into account only whole words when searching text.
Declaration
public boolean getWholeWordOnly()
Returns
| Type | Description |
|---|---|
| boolean |
|
setMatchCase(boolean value) Method
Indicates whether the search is case-sensitive.
Declaration
public void setMatchCase(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
Remarks
Pass true to the setMatchCase(boolean) method to find text portions with matching capitalization. For example, searching for “myString” matches the value “myString”, but not “mystring”.
setWholeWordOnly(boolean value) Method
Indicates whether or not to take into account only whole words when searching text.
Declaration
public void setWholeWordOnly(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|