<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFStringHasSuffix(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFStringHasSuffix"
  },
  "title" : "CFStringHasSuffix(_:_:)"
}
-->

# CFStringHasSuffix(_:_:)

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

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

## Parameters

`theString`

The string to be evaluated.

`suffix`

The suffix to search for.

## Return Value

`true` if `theString` ends with `suffix`, `false` otherwise.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)