Skip to content

Latest commit

 

History

History
129 lines (72 loc) · 2.77 KB

_buffer_mutable_text_range_.mutabletextrange.md

File metadata and controls

129 lines (72 loc) · 2.77 KB

text-manipulation > "buffer/mutable-text-range" > MutableTextRange

Class: MutableTextRange

Hierarchy

MutableTextRange

Implements

Index

Constructors

Properties

Methods


Constructors

constructor

new MutableTextRange(interval: [TextPosition, TextPosition], textBuffer: TextBuffer): MutableTextRange

Parameters:

Param Type Description
interval [TextPosition, TextPosition] -
textBuffer TextBuffer

Returns: MutableTextRange


Properties

end

● end: TextPosition


start

● start: TextPosition


<Private> textBuffer

● textBuffer: TextBuffer


Methods

exists

exists(): boolean

The range from start to end exists

Returns: boolean


getText

getText(): string

Get the text of the range

Returns: string


setText

setText(text: string): void

Change the text of the range

Parameters:

Param Type Description
text string

Returns: void


sort

sort(): MutableTextRange

Sort the range ensuring that start is less than or equal to end start <= end

Returns: MutableTextRange