C# Класс Microsoft.Languages.Core.Text.CharacterStream

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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'

Приватные методы

Метод Описание
CharacterStream ( ITextProvider textProvider ) : System
CharacterStream ( string text ) : System
CheckBounds ( ) : void
ToString ( ) : string

Описание методов

Advance() публичный Метод

Moves current position forward or backward
public Advance ( int offset ) : void
offset int Offset to move by
Результат void

CharacterStream() публичный Метод

public CharacterStream ( ITextProvider textProvider, ITextRange range ) : System
textProvider ITextProvider
range ITextRange
Результат System

CompareTo() публичный Метод

public CompareTo ( int position, int length, string text, bool ignoreCase ) : bool
position int
length int
text string
ignoreCase bool
Результат bool

GetSubstringAt() публичный Метод

public GetSubstringAt ( int position, int length ) : string
position int
length int
Результат string

IndexOf() публичный Метод

public IndexOf ( char ch, int start ) : int
ch char
start int
Результат int

IndexOf() публичный Метод

public IndexOf ( string text, int start, bool ignoreCase ) : int
text string
start int
ignoreCase bool
Результат int

IsAnsiLetter() публичный Метод

Determines if current character is an ANSI letter
public IsAnsiLetter ( ) : bool
Результат bool

IsAnsiLetter() публичный статический Метод

Determines if current character is an ANSI letter
public static IsAnsiLetter ( char character ) : bool
character char
Результат bool

IsAtNewLine() публичный Метод

Determines if current character is a new line character
public IsAtNewLine ( ) : bool
Результат bool

IsAtString() публичный Метод

Determines if current character starts a string (i.e. current character is a single or double quote).
public IsAtString ( ) : bool
Результат bool

IsDecimal() публичный Метод

Determines if character is a decimal digit
public IsDecimal ( ) : bool
Результат bool

IsDecimal() публичный статический Метод

Determines if character is a decimal digit
public static IsDecimal ( char character ) : bool
character char
Результат bool

IsEndOfStream() публичный Метод

Determines if current position is at the end of text
public IsEndOfStream ( ) : bool
Результат bool

IsHex() публичный Метод

Determines if character is a hexadecimal digit
public IsHex ( ) : bool
Результат bool

IsHex() публичный статический Метод

public static IsHex ( char character ) : bool
character char
Результат bool

IsLetter() публичный Метод

Determines if current character is a letter
public IsLetter ( ) : bool
Результат bool

IsLetter() публичный статический Метод

Determines if current character is a letter
public static IsLetter ( char character ) : bool
character char
Результат bool

IsNewLine() публичный статический Метод

public static IsNewLine ( char currentCharacter ) : bool
currentCharacter char
Результат bool

IsWhiteSpace() публичный Метод

Detemines if current character is a whitespace
public IsWhiteSpace ( ) : bool
Результат bool

LookAhead() публичный Метод

Returns characters at an offset from the current position
public LookAhead ( int offset ) : char
offset int Offset from the current position
Результат char

MoveToNextChar() публичный Метод

Moves position to the next character if possible. Returns false if position is at the end of stream.
public MoveToNextChar ( ) : bool
Результат bool

SkipLineBreak() публичный Метод

public SkipLineBreak ( ) : void
Результат void

SkipToEol() публичный Метод

public SkipToEol ( ) : void
Результат void

SkipToWhitespace() публичный Метод

public SkipToWhitespace ( ) : void
Результат void

SkipWhitespace() публичный Метод

public SkipWhitespace ( ) : void
Результат void

this() публичный Метод

Returns character at a given position. If position is beyond text limits, returns '\0'
public this ( int position ) : char
position int Stream position
Результат char