findString(_:withOptions:)
Synchronously finds all instances of the specified string in the document.
Declaration
func findString(_ string: String, withOptions options: NSString.CompareOptions = []) -> [PDFSelection]Discussion
Each hit gets added to an NSArray object as a PDFSelection object. If there are no hits, this method returns an empty array.
Use this method when the complete search process will be brief and when you don’t need the flexibility or control offered by beginFindString(_:withOptions:). For options, refer to Searching, Comparing, and Sorting Strings.