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

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

Méthodes publiques

Méthode 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 méthode

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
Résultat bool

IsWhitespaceOnlyBetweenPositions() public static méthode

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
Résultat bool

SplitTextIntoLines() public static méthode

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