<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/HasSuffixComparator/init(withResolvers:mappingTransform:)-7tdan",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents19HasSuffixComparatorC13withResolvers16mappingTransformACyxS2Sq1_Gqd__yc_q1_SSctcAA14EntityPropertyCySSGRbzSSRs_SSRs0_AA21ResolverSpecificationRd__lufc"
  },
  "title" : "init(withResolvers:mappingTransform:)"
}
-->

# init(withResolvers:mappingTransform:)

Declares support for the `hasSuffix` operator between a `String` property and user-supplied values.

```
init<Spec>(@ResolverSpecificationBuilder<String.UnwrappedType> withResolvers resolvers: @escaping () -> Spec, mappingTransform: @escaping (InputType) -> ComparatorMappingType) where Property : EntityProperty<String>, PropertyType == String, InputType == String, Spec : ResolverSpecification
```

## Parameters

`resolvers`

Set of `Resolver`s to apply when converting user input to the target `Value` type.

`mappingTransform`

Closure that transforms the user-supplied value into the `ComparatorMappingType` output type.

---

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)