---
title: "init(mappingTransform:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/containscomparator/init(mappingtransform:)-9fn0e"
---

# init(mappingTransform:)

Declares support for the contains operator between a String? property and user-supplied values.

## Declaration

```swift
init(mappingTransform: @escaping (InputType) -> ComparatorMappingType) where PropertyType : ExpressibleByNilLiteral, InputType == String, PropertyType.UnwrappedType == String
```

## Parameters

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