---
title: "getLineStart(_:end:contentsEnd:for:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/stringprotocol/getlinestart(_:end:contentsend:for:)"
---

# getLineStart(_:end:contentsEnd:for:)

Returns by reference the beginning of the first line and the end of the last line touched by the given range.

## Declaration

```swift
func getLineStart(_ start: UnsafeMutablePointer<Self.Index>, end: UnsafeMutablePointer<Self.Index>, contentsEnd: UnsafeMutablePointer<Self.Index>, for range: some RangeExpression<String.Index>)
```
