offset(from:to:)
Returns the number of UTF-16 characters between one text position and another text position.
Declaration
func offset(from: UITextPosition, to toPosition: UITextPosition) -> IntParameters
- from:
A custom object that represents a location within a document.
- toPosition:
A custom object that represents another location within document.
Return Value
The number of UTF-16 characters between fromPosition and toPosition.