C# Класс CNCGUI.TextParser

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

Открытые свойства

Свойство Тип Описание
NullChar char

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

Метод Описание
Extract ( int start ) : string

Extracts a substring from the specified position to the end of the text

Extract ( int start, int end ) : string

Extracts a substring from the specified range of the current text

MoveAhead ( ) : void

Moves the current position ahead one character

MoveAhead ( int ahead ) : void

Moves the current position ahead the specified number of characters

MovePast ( char chars ) : void

Moves to the next occurrence of any character that is not one of the specified characters

MovePastWhitespace ( ) : void

Moves the current position to the next character that is not whitespace

MoveTo ( char c ) : void

Moves to the next occurrence of the specified character

MoveTo ( string s, bool ignoreCase = false ) : void

Moves to the next occurrence of the specified string

MoveToEndOfLine ( ) : void

Moves the current position to the first character that is part of a newline

Peek ( ) : char

Returns the character at the current position, or a null character if we're at the end of the document

Peek ( int ahead ) : char

Returns the character at the specified number of characters beyond the current position, or a null character if the specified position is at the end of the document

Reset ( ) : void

Resets the current position to the start of the current document

Reset ( string text ) : void

Sets the current document and resets the current position to the start of it

TextParser ( ) : System
TextParser ( string text ) : System

Защищенные методы

Метод Описание
IsInArray ( char c, char chars ) : bool

Determines if the specified character exists in the specified character array.

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

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

Extracts a substring from the specified position to the end of the text
public Extract ( int start ) : string
start int
Результат string

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

Extracts a substring from the specified range of the current text
public Extract ( int start, int end ) : string
start int
end int
Результат string

IsInArray() защищенный Метод

Determines if the specified character exists in the specified character array.
protected IsInArray ( char c, char chars ) : bool
c char Character to find
chars char Character array to search
Результат bool

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

Moves the current position ahead one character
public MoveAhead ( ) : void
Результат void

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

Moves the current position ahead the specified number of characters
public MoveAhead ( int ahead ) : void
ahead int The number of characters to move ahead
Результат void

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

Moves to the next occurrence of any character that is not one of the specified characters
public MovePast ( char chars ) : void
chars char Array of characters to move past
Результат void

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

Moves the current position to the next character that is not whitespace
public MovePastWhitespace ( ) : void
Результат void

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

Moves to the next occurrence of the specified character
public MoveTo ( char c ) : void
c char Character to find
Результат void

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

Moves to the next occurrence of the specified string
public MoveTo ( string s, bool ignoreCase = false ) : void
s string String to find
ignoreCase bool Indicates if case-insensitive comparisons /// are used
Результат void

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

Moves the current position to the first character that is part of a newline
public MoveToEndOfLine ( ) : void
Результат void

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

Returns the character at the current position, or a null character if we're at the end of the document
public Peek ( ) : char
Результат char

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

Returns the character at the specified number of characters beyond the current position, or a null character if the specified position is at the end of the document
public Peek ( int ahead ) : char
ahead int The number of characters beyond the current position
Результат char

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

Resets the current position to the start of the current document
public Reset ( ) : void
Результат void

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

Sets the current document and resets the current position to the start of it
public Reset ( string text ) : void
text string
Результат void

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

public TextParser ( ) : System
Результат System

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

public TextParser ( string text ) : System
text string
Результат System

Описание свойств

NullChar публичное статическое свойство

public static char NullChar
Результат char