C# Класс NppSharp.TextLocation

Represents a character position within the document.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
Start TextLocation

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

Метод Описание
Equals ( object obj ) : bool

Compares equality between this object and another TextLocation.

FromByteOffset ( int offset ) : TextLocation

Find the text location for a byte offset.

If the offset happens to land in the middle of a multi-byte character, this function will return a text location pointing to the character that begins just prior to the offset.

If the offset is before the start of the document (a negative number), then a location pointing to the start of the document will be returned.

If the offset is after the end of the document, then a location pointing to the end of the document will be returned.

GetHashCode ( ) : int

Returns a hash code for this object.

TextLocation ( TextLocation c ) : System.Linq

Copies a text location object.

TextLocation ( int line, int charPos ) : System.Linq

Creates a text location object with a specific line and column.

ToString ( ) : string

Returns a string representation of this location.

operator ( ) : TextLocation

Moves the text location by a specified number of characters.

operator ( ) : bool

Compares inequality between two TextLocation objects.

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

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

Compares equality between this object and another TextLocation.
public Equals ( object obj ) : bool
obj object The object that will be compared.
Результат bool

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

Find the text location for a byte offset.

If the offset happens to land in the middle of a multi-byte character, this function will return a text location pointing to the character that begins just prior to the offset.

If the offset is before the start of the document (a negative number), then a location pointing to the start of the document will be returned.

If the offset is after the end of the document, then a location pointing to the end of the document will be returned.

public static FromByteOffset ( int offset ) : TextLocation
offset int The zero-based byte offset to find.
Результат TextLocation

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

Returns a hash code for this object.
public GetHashCode ( ) : int
Результат int

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

Copies a text location object.
public TextLocation ( TextLocation c ) : System.Linq
c TextLocation The location to be copied.
Результат System.Linq

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

Creates a text location object with a specific line and column.
public TextLocation ( int line, int charPos ) : System.Linq
line int The one-based line number.
charPos int The one-based character position.
Результат System.Linq

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

Returns a string representation of this location.
public ToString ( ) : string
Результат string

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

Moves the text location by a specified number of characters.
public static operator ( ) : TextLocation
Результат TextLocation

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

Compares inequality between two TextLocation objects.
public static operator ( ) : bool
Результат bool

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

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

A location representing the start of the document (line 1, character position 1).
public static TextLocation,NppSharp Start
Результат TextLocation