---
title: string
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextfinderclient/string
---

# string

Allows the client to specify a single string for searching.

## Declaration

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

## Discussion

Discussion If the client cannot logically or efficiently flatten itself into a single string, then the string(at:effectiveRange:endsWithSearchBoundary:) and stringLength() methods should be implemented instead.

## See Also

### String Searching

- [string(at:effectiveRange:endsWithSearchBoundary:)](appkit/nstextfinderclient/string(at:effectiverange:endswithsearchboundary:).md)
- [stringLength()](appkit/nstextfinderclient/stringlength().md)
