---
title: "characterIndexForPoint:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextinput/characterindexforpoint:"
---

# characterIndexForPoint:

Returns the index of the character whose frame rectangle includes the given point.

## Declaration

```occ
- (NSUInteger) characterIndexForPoint:(NSPoint) point;
```

## Parameters

- `point`: A point, in screen coordinates.

## Return Value

Return Value The character index, measured from the start of the receiver’s text storage, of the character containing the given point. Returns NSNotFound if the cursor is not within a character.

## See Also

### Character coordinates

- [firstRectForCharacterRange:](appkit/nstextinput/firstrectforcharacterrange:.md)
