---
title: string
framework: pdfkit
role: symbol
role_heading: Instance Property
path: pdfkit/pdfselection/string
---

# string

Returns an NSString object representing the text contained in the selection (may contain linefeed characters).

## Declaration

```swift
var string: String? { get }
```

## See Also

### Related Documentation

- [PDFSelection](pdfkit/pdfselection.md)

### Getting Information About a Selection

- [pages](pdfkit/pdfselection/pages.md)
- [attributedString](pdfkit/pdfselection/attributedstring.md)
- [bounds(for:)](pdfkit/pdfselection/bounds(for:).md)
- [selectionsByLine()](pdfkit/pdfselection/selectionsbyline().md)
- [color](pdfkit/pdfselection/color.md)
