---
title: "hasSuffix(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/stringprotocol/hassuffix(_:)"
---

# hasSuffix(_:)

## Declaration

```swift
func hasSuffix(_ suffix: String) -> Bool
```
