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

Show file Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
Advance ( int offset ) : void

Moves current position forward or backward

CharacterStream ( ITextProvider textProvider, ITextRange range ) : System
CompareTo ( int position, int length, string text, bool ignoreCase ) : bool
GetSubstringAt ( int position, int length ) : string
IndexOf ( char ch, int start ) : int
IndexOf ( string text, int start, bool ignoreCase ) : int
IsAnsiLetter ( ) : bool

Determines if current character is an ANSI letter

IsAnsiLetter ( char character ) : bool

Determines if current character is an ANSI letter

IsAtNewLine ( ) : bool

Determines if current character is a new line character

IsAtString ( ) : bool

Determines if current character starts a string (i.e. current character is a single or double quote).

IsDecimal ( ) : bool

Determines if character is a decimal digit

IsDecimal ( char character ) : bool

Determines if character is a decimal digit

IsEndOfStream ( ) : bool

Determines if current position is at the end of text

IsHex ( ) : bool

Determines if character is a hexadecimal digit

IsHex ( char character ) : bool
IsLetter ( ) : bool

Determines if current character is a letter

IsLetter ( char character ) : bool

Determines if current character is a letter

IsNewLine ( char currentCharacter ) : bool
IsWhiteSpace ( ) : bool

Detemines if current character is a whitespace

LookAhead ( int offset ) : char

Returns characters at an offset from the current position

MoveToNextChar ( ) : bool

Moves position to the next character if possible. Returns false if position is at the end of stream.

SkipLineBreak ( ) : void
SkipToEol ( ) : void
SkipToWhitespace ( ) : void
SkipWhitespace ( ) : void
this ( int position ) : char

Returns character at a given position. If position is beyond text limits, returns '\0'

Private Methods

Method Description
CharacterStream ( ITextProvider textProvider ) : System
CharacterStream ( string text ) : System
CheckBounds ( ) : void
ToString ( ) : string

Method Details

Advance() public method

Moves current position forward or backward
public Advance ( int offset ) : void
offset int Offset to move by
return void

CharacterStream() public method

public CharacterStream ( ITextProvider textProvider, ITextRange range ) : System
textProvider ITextProvider
range ITextRange
return System

CompareTo() public method

public CompareTo ( int position, int length, string text, bool ignoreCase ) : bool
position int
length int
text string
ignoreCase bool
return bool

GetSubstringAt() public method

public GetSubstringAt ( int position, int length ) : string
position int
length int
return string

IndexOf() public method

public IndexOf ( char ch, int start ) : int
ch char
start int
return int

IndexOf() public method

public IndexOf ( string text, int start, bool ignoreCase ) : int
text string
start int
ignoreCase bool
return int

IsAnsiLetter() public method

Determines if current character is an ANSI letter
public IsAnsiLetter ( ) : bool
return bool

IsAnsiLetter() public static method

Determines if current character is an ANSI letter
public static IsAnsiLetter ( char character ) : bool
character char
return bool

IsAtNewLine() public method

Determines if current character is a new line character
public IsAtNewLine ( ) : bool
return bool

IsAtString() public method

Determines if current character starts a string (i.e. current character is a single or double quote).
public IsAtString ( ) : bool
return bool

IsDecimal() public method

Determines if character is a decimal digit
public IsDecimal ( ) : bool
return bool

IsDecimal() public static method

Determines if character is a decimal digit
public static IsDecimal ( char character ) : bool
character char
return bool

IsEndOfStream() public method

Determines if current position is at the end of text
public IsEndOfStream ( ) : bool
return bool

IsHex() public method

Determines if character is a hexadecimal digit
public IsHex ( ) : bool
return bool

IsHex() public static method

public static IsHex ( char character ) : bool
character char
return bool

IsLetter() public method

Determines if current character is a letter
public IsLetter ( ) : bool
return bool

IsLetter() public static method

Determines if current character is a letter
public static IsLetter ( char character ) : bool
character char
return bool

IsNewLine() public static method

public static IsNewLine ( char currentCharacter ) : bool
currentCharacter char
return bool

IsWhiteSpace() public method

Detemines if current character is a whitespace
public IsWhiteSpace ( ) : bool
return bool

LookAhead() public method

Returns characters at an offset from the current position
public LookAhead ( int offset ) : char
offset int Offset from the current position
return char

MoveToNextChar() public method

Moves position to the next character if possible. Returns false if position is at the end of stream.
public MoveToNextChar ( ) : bool
return bool

SkipLineBreak() public method

public SkipLineBreak ( ) : void
return void

SkipToEol() public method

public SkipToEol ( ) : void
return void

SkipToWhitespace() public method

public SkipToWhitespace ( ) : void
return void

SkipWhitespace() public method

public SkipWhitespace ( ) : void
return void

this() public method

Returns character at a given position. If position is beyond text limits, returns '\0'
public this ( int position ) : char
position int Stream position
return char