---
title: "predicateWithFormat:"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nspredicate/predicatewithformat:"
---

# predicateWithFormat:

Creates and returns a new predicate formed by creating a new string with a specified format and parsing the result.

## Declaration

```occ
+ (NSPredicate *) predicateWithFormat:(NSString *) predicateFormat;
```

## Parameters

- `predicateFormat`: The format string for the new predicate.

## Return Value

Return Value A new predicate formed by creating a new string with format and parsing the result.

## Discussion

Discussion Pass a comma-separated list of trailing variadic arguments to substitute into format. For details of the format of the format string and of limitations on variable substitution, see Predicate Format String Syntax.

## See Also

### Related Documentation

- [Predicate Programming Guide](apple-archive/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html.md)

### Creating a Predicate

- [init(format:argumentArray:)](foundation/nspredicate/init(format:argumentarray:).md)
- [init(format:arguments:)](foundation/nspredicate/init(format:arguments:).md)
- [withSubstitutionVariables(_:)](foundation/nspredicate/withsubstitutionvariables(_:).md)
- [init(value:)](foundation/nspredicate/init(value:).md)
- [init(block:)](foundation/nspredicate/init(block:).md)
- [init(fromMetadataQueryString:)](foundation/nspredicate/init(frommetadataquerystring:).md)
