---
title: "beginFindString(_:withOptions:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfdocument/beginfindstring(_:withoptions:)"
---

# beginFindString(_:withOptions:)

Asynchronously finds all instances of the specified string in the document.

## Declaration

```swift
func beginFindString(_ string: String, withOptions options: NSString.CompareOptions = [])
```

## Discussion

Discussion This method returns immediately. It causes notifications to be issued when searching begins and ends, on each search hit, and when the search proceeds to a new page. For options, refer to Searching, Comparing, and Sorting Strings.

## See Also

### Searching Documents

- [findString(_:withOptions:)](pdfkit/pdfdocument/findstring(_:withoptions:).md)
- [beginFindStrings(_:withOptions:)](pdfkit/pdfdocument/beginfindstrings(_:withoptions:).md)
- [findString(_:fromSelection:withOptions:)](pdfkit/pdfdocument/findstring(_:fromselection:withoptions:).md)
- [isFinding](pdfkit/pdfdocument/isfinding.md)
- [cancelFindString()](pdfkit/pdfdocument/cancelfindstring().md)
