---
title: "==(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/string/==(_:_:)"
---

# ==(_:_:)

Returns a Boolean value indicating whether two values are equal.

## Declaration

```swift
static func == (lhs: String, rhs: String) -> Bool
```

## Parameters

- `lhs`: A value to compare.
- `rhs`: Another value to compare.

## Discussion

Discussion Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

## See Also

### Comparing Strings Using Operators

- [==(_:_:)](swift/string/==(_:_:)-8kzxf.md)
- [!=(_:_:)](swift/string/!=(_:_:)-frzf.md)
- [~=(_:_:)](swift/string/~=(_:_:).md)
