Skip to main content

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

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
TextSearchOptions

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

true to perform a case-sensitive search; otherwise, false.

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

true, if whole words should match the search criteria; otherwise false.

setMatchCase(boolean value) Method

Indicates whether the search is case-sensitive.

Declaration

public void setMatchCase(boolean value)

Parameters

Name Type Description
value boolean

true to perform a case-sensitive search; otherwise, false.

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

true, if whole words should match the search criteria; otherwise false.