編輯

共用方式為


ITextRangeProvider.GetText(Int32) Method

Definition

Retrieves the plain text of the range.

public:
 System::String ^ GetText(int maxLength);
public string GetText (int maxLength);
abstract member GetText : int -> string
Public Function GetText (maxLength As Integer) As String

Parameters

maxLength
Int32

The maximum length of the string to return. Use -1 if no limit is required.

Returns

The plain text of the text range, possibly truncated at the specified maxLength.

Exceptions

If maxLength is less than -1.

Remarks

GetText respects both hidden and visible text.

If maxLength is greater than the length of the text span of the caller, the string returned will be the plain text of the text range.

GetText will not be affected by the order of endpoints in the text flow; it will always return the text between the Start and End endpoints of the text range in the logical text flow order.

Applies to