<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriEvaluations",
  "identifier" : "/documentation/SiriEvaluations/SiriResponse/Text/contains(_:caseSensitive:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Siri Evaluations"
    ],
    "preciseIdentifier" : "s:15SiriEvaluations0A8ResponseV4TextV8contains_13caseSensitiveAESS_SbtFZ"
  },
  "title" : "contains(_:caseSensitive:)"
}
-->

# contains(_:caseSensitive:)

Returns a check that the reply’s text contains the value.

```
static func contains(_ value: String, caseSensitive: Bool = true) -> SiriResponse.Text
```

## Discussion

Case-sensitive unless `caseSensitive` is `false`. Ignoring case suits a word Siri
may capitalize or not (`honeymoon`), where a flight number or a name the person gave is
better checked exactly. `value` is always plain text, never a pattern.

---

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)