Caret
public struct Caret : Hashable, CustomStringConvertible
Caret position of a TextEngine.
-
Range of text this caret covers on a text engine
Declaration
Swift
public var textRange: Text.TextRange -
Position of this text caret.
If
positionisCaretPosition.start, this value matches the value ofstart, otherwise this value matchesend, instead.Declaration
Swift
public var location: Int { get } -
Position of the caret within the text range.
Declaration
Swift
public var position: CaretPosition -
Start of text range this caret covers
Declaration
Swift
public var start: Int { get } -
End of text range this caret covers
Declaration
Swift
public var end: Int { get } -
Length of text this caret covers
Declaration
Swift
public var length: Int { get } -
Declaration
Swift
public var description: String { get }