---
title: anchored
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsstring/compareoptions/anchored
---

# anchored

Search is limited to start (or end, if NSBackwardsSearch) of source string.

## Declaration

```swift
static var anchored: NSString.CompareOptions { get }
```

## See Also

### Constants

- [caseInsensitive](foundation/nsstring/compareoptions/caseinsensitive.md)
- [literal](foundation/nsstring/compareoptions/literal.md)
- [backwards](foundation/nsstring/compareoptions/backwards.md)
- [numeric](foundation/nsstring/compareoptions/numeric.md)
- [diacriticInsensitive](foundation/nsstring/compareoptions/diacriticinsensitive.md)
- [widthInsensitive](foundation/nsstring/compareoptions/widthinsensitive.md)
- [forcedOrdering](foundation/nsstring/compareoptions/forcedordering.md)
- [regularExpression](foundation/nsstring/compareoptions/regularexpression.md)
