Compartir a través de


Source.GetWordExtent(Int32, Int32, WORDEXTFLAGS, Int32, Int32) Method

Definition

Gets the span occupied by the word at the specified location.

public:
 bool GetWordExtent(int line, int idx, Microsoft::VisualStudio::TextManager::Interop::WORDEXTFLAGS flags, [Runtime::InteropServices::Out] int % startIdx, [Runtime::InteropServices::Out] int % endIdx);
bool GetWordExtent(int line, int idx, Microsoft::VisualStudio::TextManager::Interop::WORDEXTFLAGS flags, [Runtime::InteropServices::Out] int & startIdx, [Runtime::InteropServices::Out] int & endIdx);
public bool GetWordExtent (int line, int idx, Microsoft.VisualStudio.TextManager.Interop.WORDEXTFLAGS flags, out int startIdx, out int endIdx);
member this.GetWordExtent : int * int * Microsoft.VisualStudio.TextManager.Interop.WORDEXTFLAGS * int * int -> bool
Public Function GetWordExtent (line As Integer, idx As Integer, flags As WORDEXTFLAGS, ByRef startIdx As Integer, ByRef endIdx As Integer) As Boolean

Parameters

line
Int32

The line on which the word to examine is located.

idx
Int32

The offset into the line to somewhere in the word (does not have to be at the beginning of the word).

flags
WORDEXTFLAGS

A combination of flags from the WORDEXTFLAGS enumeration.

startIdx
Int32

[out] Returns the offset of the first character of the word.

endIdx
Int32

[out] Returns the offset of the character one past the last character of the word.

Returns

true if the word was found; otherwise, false, meaning that there is no word at that position.

Remarks

This method calls the colorizer's GetLineInfo method to obtain the list of tokens for the specified line. Then using the token list and the specified flags, this method proceeds to find the requested token.

Applies to