text-manipulation > "buffer/mutable-text-range" > MutableTextRange
MutableTextRange
⊕ new MutableTextRange(interval: [TextPosition, TextPosition], textBuffer: TextBuffer): MutableTextRange
Parameters:
Param | Type | Description |
---|---|---|
interval | [TextPosition, TextPosition] | - |
textBuffer | TextBuffer |
Returns: MutableTextRange
● end: TextPosition
● start: TextPosition
● textBuffer: TextBuffer
▸ exists(): boolean
The range from start to end exists
Returns: boolean
▸ getText(): string
Get the text of the range
Returns: string
▸ setText(text: string
): void
Change the text of the range
Parameters:
Param | Type | Description |
---|---|---|
text | string |
Returns: void
▸ sort(): MutableTextRange
Sort the range ensuring that start is less than or equal to end start <= end
Returns: MutableTextRange