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

A helper class exposing various helper functions that are used in formatting, smart indent and elsewhere else.
Exibir arquivo Open project: Microsoft/RTVS

Public Methods

Method Description
IsNewLineAfterPosition ( ITextProvider textProvider, int position ) : bool

Determines if there is nothing but whitespace between given position and the next line break or end of file.

IsWhitespaceOnlyBetweenPositions ( ITextProvider textProvider, int start, int end ) : bool

Determines if there is nothing but whitespace between given positions (end is non-inclusive).

SplitTextIntoLines ( string text ) : IList

Splits string into lines based on line breaks

Method Details

IsNewLineAfterPosition() public static method

Determines if there is nothing but whitespace between given position and the next line break or end of file.
public static IsNewLineAfterPosition ( ITextProvider textProvider, int position ) : bool
textProvider ITextProvider Text provider
position int Position to check
return bool

IsWhitespaceOnlyBetweenPositions() public static method

Determines if there is nothing but whitespace between given positions (end is non-inclusive).
public static IsWhitespaceOnlyBetweenPositions ( ITextProvider textProvider, int start, int end ) : bool
textProvider ITextProvider Text provider
start int
end int
return bool

SplitTextIntoLines() public static method

Splits string into lines based on line breaks
public static SplitTextIntoLines ( string text ) : IList
text string
return IList