---
title: "CTLineGetStringRange(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctlinegetstringrange(_:)"
---

# CTLineGetStringRange(_:)

Gets the range of characters that originally spawned the glyphs in the line.

## Declaration

```swift
func CTLineGetStringRange(_ line: CTLine) -> CFRange
```

## Parameters

- `line`: The line from which to obtain the string range.

## Return Value

Return Value A CFRange structure that contains the range over the backing store string that spawned the glyphs, or if the function fails for any reason, an empty range.

## See Also

### Getting Line Data

- [CTLineGetGlyphCount(_:)](coretext/ctlinegetglyphcount(_:).md)
- [CTLineGetGlyphRuns(_:)](coretext/ctlinegetglyphruns(_:).md)
- [CTLineGetPenOffsetForFlush(_:_:_:)](coretext/ctlinegetpenoffsetforflush(_:_:_:).md)
