XCBufferP - XcodeExtKit/XcodeExtBase GitHub Wiki
public protocol XCBufferP
@discardableResult func insert(_ str: Str, after index: Int) -> Bool
@discardableResult func insertAfterSelection(_ str: Str) -> Bool
insert text at the very bottom
func addAtTheBottom(_ str: Str)
@discardableResult func removeSelectedLines() -> Bool
@discardableResult func replaceSelectedLines(with str: Str) -> Bool
@discardableResult func selectLines(startIndex: Int, endIndex: Int) -> Bool
returns selected line indexes, if any
var selectedLineIndexes: Set<Int>?
returns last selected line indexe, if any is selected
var lastSelectedLineIdx: Int?
returns selected lines (if any), trimmed from newLine, in line order
var selectedLines: [Str]?
var selectedRange: NSRange?
var selectedXCRange: XCRangeP?
@discardableResult func select(_ rng: XCRangeP) -> Bool
var hasSelection: Bool
var _lines: [Str]
func lines(in rng: NSRange) -> [Str]
The complete buffer's string representation, as a convenience. Changes to lines
are immediately reflected in this property, and vice versa
var finalText: Str