C# 클래스 AvalonStudio.TextEditor.Utils.CharRope

Poor man's template specialization: extension methods for Rope<char>.
파일 보기 프로젝트 열기: VitalElement/AvalonStudio 1 사용 예제들

공개 메소드들

메소드 설명
AddText ( this rope, string text ) : void

Appends text to this rope. Runs in O(lg N + M).

Create ( string text ) : Rope

Creates a new rope from the specified text.

IndexOf ( this rope, string searchText, int startIndex, int length, System.StringComparison comparisonType ) : int

Gets the index of the first occurrence of the search text.

IndexOfAny ( this rope, char anyOf, int startIndex, int length ) : int

Gets the index of the first occurrence of any element in the specified array.

InsertText ( this rope, int index, string text ) : void

Inserts text into this rope. Runs in O(lg N + M).

LastIndexOf ( this rope, string searchText, int startIndex, int length, System.StringComparison comparisonType ) : int

Gets the index of the last occurrence of the search text.

ToString ( this rope, int startIndex, int length ) : string

Retrieves the text for a portion of the rope. Runs in O(lg N + M), where M=length.

This method counts as a read access and may be called concurrently to other read accesses.

WriteTo ( this rope, TextWriter output, int startIndex, int length ) : void

Retrieves the text for a portion of the rope and writes it to the specified text writer. Runs in O(lg N + M), where M=length.

This method counts as a read access and may be called concurrently to other read accesses.

비공개 메소드들

메소드 설명
FillNode ( RopeNode node, string text, int start ) : void
InitFromString ( string text ) : RopeNode
WriteTo ( this node, int index, TextWriter output, int count ) : void

메소드 상세

AddText() 공개 정적인 메소드

Appends text to this rope. Runs in O(lg N + M).
newElements is null.
public static AddText ( this rope, string text ) : void
rope this
text string
리턴 void

Create() 공개 정적인 메소드

Creates a new rope from the specified text.
public static Create ( string text ) : Rope
text string
리턴 Rope

IndexOf() 공개 정적인 메소드

Gets the index of the first occurrence of the search text.
public static IndexOf ( this rope, string searchText, int startIndex, int length, System.StringComparison comparisonType ) : int
rope this
searchText string
startIndex int
length int
comparisonType System.StringComparison
리턴 int

IndexOfAny() 공개 정적인 메소드

Gets the index of the first occurrence of any element in the specified array.
public static IndexOfAny ( this rope, char anyOf, int startIndex, int length ) : int
rope this The target rope.
anyOf char Array of characters being searched.
startIndex int Start index of the search.
length int Length of the area to search.
리턴 int

InsertText() 공개 정적인 메소드

Inserts text into this rope. Runs in O(lg N + M).
newElements is null. index or length is outside the valid range.
public static InsertText ( this rope, int index, string text ) : void
rope this
index int
text string
리턴 void

LastIndexOf() 공개 정적인 메소드

Gets the index of the last occurrence of the search text.
public static LastIndexOf ( this rope, string searchText, int startIndex, int length, System.StringComparison comparisonType ) : int
rope this
searchText string
startIndex int
length int
comparisonType System.StringComparison
리턴 int

ToString() 공개 정적인 메소드

Retrieves the text for a portion of the rope. Runs in O(lg N + M), where M=length.
This method counts as a read access and may be called concurrently to other read accesses.
offset or length is outside the valid range.
public static ToString ( this rope, int startIndex, int length ) : string
rope this
startIndex int
length int
리턴 string

WriteTo() 공개 정적인 메소드

Retrieves the text for a portion of the rope and writes it to the specified text writer. Runs in O(lg N + M), where M=length.
This method counts as a read access and may be called concurrently to other read accesses.
offset or length is outside the valid range.
public static WriteTo ( this rope, TextWriter output, int startIndex, int length ) : void
rope this
output System.IO.TextWriter
startIndex int
length int
리턴 void