---
title: "CFStringHasSuffix(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringhassuffix(_:_:)"
---

# CFStringHasSuffix(_:_:)

Determines if a string ends with a specified sequence of characters.

## Declaration

```swift
func CFStringHasSuffix(_ theString: CFString!, _ suffix: CFString!) -> Bool
```

## Parameters

- `theString`: The string to be evaluated.
- `suffix`: The suffix to search for.

## Return Value

Return Value true if theString ends with suffix, false otherwise.

## See Also

### Comparing Strings

- [CFStringCompare(_:_:_:)](corefoundation/cfstringcompare(_:_:_:).md)
- [CFStringCompareWithOptions(_:_:_:_:)](corefoundation/cfstringcomparewithoptions(_:_:_:_:).md)
- [CFStringCompareWithOptionsAndLocale(_:_:_:_:_:)](corefoundation/cfstringcomparewithoptionsandlocale(_:_:_:_:_:).md)
- [CFStringHasPrefix(_:_:)](corefoundation/cfstringhasprefix(_:_:).md)
