---
title: "string(at:effectiveRange:endsWithSearchBoundary:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextfinderclient/string(at:effectiverange:endswithsearchboundary:)"
---

# string(at:effectiveRange:endsWithSearchBoundary:)

Returns the found string that is created by conceptually mapping its content to a single string, which is composed of a concatenation of all its substrings.

## Declaration

```swift
optional func string(at characterIndex: Int, effectiveRange outRange: NSRangePointer, endsWithSearchBoundary outFlag: UnsafeMutablePointer<ObjCBool>) -> String
```

## Parameters

- `characterIndex`: The given character index the client should return.
- `outRange`: Returns, by reference, the “effective range” of that substring in the full conceptually concatenated string
- `outFlag`: Returns, by-reference, whether the substring ends with a “search boundary”, meaning that NSTextFinder should not attempt to find any matches that overlap this boundary.

## Return Value

Return Value Returns the found string.

## Discussion

Discussion See NSTextFinder for more information.

## See Also

### String Searching

- [string](appkit/nstextfinderclient/string.md)
- [stringLength()](appkit/nstextfinderclient/stringlength().md)
