---
title: "compare(_:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/cssuggestion/compare(_:)"
---

# compare(_:)

Compares the suggestion with a second specified suggestion.

## Declaration

```swift
func compare(_ other: CSSuggestion) -> ComparisonResult
```

## Parameters

- `other`: The suggestion to compare to this suggestion.

## Return Value

Return Value Returns an NSComparisonResult.

## See Also

### Comparing suggestions

- [compare(byRank:)](corespotlight/cssuggestion/compare(byrank:).md)
