C# Class Microsoft.Languages.Core.Text.TextProviderExtensions

Exibir arquivo Open project: Microsoft/RTVS

Public Methods

Method Description
IsNewLineBeforePosition ( this textProvider, int position ) : bool

Detemines if there is nothing but whitespace between given position and preceding line break or beginning of the file.

IsWhiteSpaceOnlyRange ( this textProvider, int start, int end ) : bool
IsWhitespaceBeforePosition ( this textProvider, int position ) : bool
LineBreaksAfterPosition ( this textProvider, int position ) : int

Counts number of line breaks between position and the nearest non-whitespace character that follows the position

LineBreaksBeforePosition ( this textProvider, int position ) : int

Counts number of line breaks between position and the nearest non-whitespace character that precedes the position

TryGetNewLineBeforePosition ( this textProvider, int position, int &newLinePosition ) : bool

Method Details

IsNewLineBeforePosition() public static method

Detemines if there is nothing but whitespace between given position and preceding line break or beginning of the file.
public static IsNewLineBeforePosition ( this textProvider, int position ) : bool
textProvider this Text provider
position int Position to check
return bool

IsWhiteSpaceOnlyRange() public static method

public static IsWhiteSpaceOnlyRange ( this textProvider, int start, int end ) : bool
textProvider this
start int
end int
return bool

IsWhitespaceBeforePosition() public static method

public static IsWhitespaceBeforePosition ( this textProvider, int position ) : bool
textProvider this
position int
return bool

LineBreaksAfterPosition() public static method

Counts number of line breaks between position and the nearest non-whitespace character that follows the position
public static LineBreaksAfterPosition ( this textProvider, int position ) : int
textProvider this
position int
return int

LineBreaksBeforePosition() public static method

Counts number of line breaks between position and the nearest non-whitespace character that precedes the position
public static LineBreaksBeforePosition ( this textProvider, int position ) : int
textProvider this
position int
return int

TryGetNewLineBeforePosition() public static method

public static TryGetNewLineBeforePosition ( this textProvider, int position, int &newLinePosition ) : bool
textProvider this
position int
newLinePosition int
return bool