TextImageExtensions.GetText Method

Definition

Overloads

GetText(ITextImage)

Gets all the text in the image.

GetText(ITextImage, Int32, Int32)

Gets text from the image starting at startIndex and having length equal to length.

GetText(ITextImage)

Gets all the text in the image.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetText(Microsoft::VisualStudio::Text::ITextImage ^ image);

Parameters

image
ITextImage

Returns

A non-null string.

Remarks

Caveat emptor. Calling GetText() on a 100MB ITextImage will give you exactly what you asked for, which probably isn't what you wanted.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2017, 2019, 2022

GetText(ITextImage, Int32, Int32)

Gets text from the image starting at startIndex and having length equal to length.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetText(Microsoft::VisualStudio::Text::ITextImage ^ image, int startIndex, int length);

Parameters

image
ITextImage

Text source.

startIndex
Int32

The starting index.

length
Int32

The length of text to get.

Returns

The string of length length starting at startIndex in the underlying ITextBuffer.

Exceptions

startIndex is less than zero or greater than the length of the image, or length is less than zero, or startIndex plus length is greater than the length of the image.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2017, 2019, 2022