<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSPredicate/init(format:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So11NSPredicateC10FoundationE6format_ABSSh_s7CVarArg_pdtcfc"
  },
  "title" : "init(format:_:)"
}
-->

# init(format:_:)

Creates a predicate by substituting the values in an argument list into a format string and parsing the result.

```
convenience init(format predicateFormat: String, _ args: any CVarArg...)
```

## Parameters

`predicateFormat`

The format string for the new predicate.

`args`

The arguments to substitute into `predicateFormat`.

## 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)