<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSSpecifierTest/TestComparisonOperation/contains",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSTestComparisonOperation@NSContainsComparison"
  },
  "title" : "NSSpecifierTest.TestComparisonOperation.contains"
}
-->

# NSSpecifierTest.TestComparisonOperation.contains

Binary containment operator that results in true if the test object is a list or string that matches the other object (which is also a list or string) at any location.

```
case contains
```

---

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)