characterIndex(at:)
Returns the character index value for the specified point in page space.
Declaration
func characterIndex(at point: CGPoint) -> Intfunc characterIndex(at point: NSPoint) -> IntDiscussion
If there is no character at the specified point, the method returns -1.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.