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

# hasSuffix(_:)

## Declaration

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

## See Also

### Finding Substrings

- [hasPrefix(_:)](swift/string/hasprefix(_:).md)
