---
title: "rangeInString:"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsattributedstringmarkdownsourceposition/rangeinstring:"
---

# rangeInString:

Returns a range indicating the source portion within a Markdown string.

## Declaration

```occ
- (NSRange) rangeInString:(NSString *) string;
```

## Parameters

- `string`: The Markdown source string that this source position object refers to.

## Return Value

Return Value A range that represents the source portion within a source Markdown string.

## Discussion

Discussion Use this method to access the marked-up region of string with an NSRange, rather than making manual calculations based on row and column values.
