---
title: "CFCharacterSetCreateInvertedSet(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfcharactersetcreateinvertedset(_:_:)"
---

# CFCharacterSetCreateInvertedSet(_:_:)

Creates a new immutable character set that is the invert of the specified character set.

## Declaration

```swift
func CFCharacterSetCreateInvertedSet(_ alloc: CFAllocator!, _ theSet: CFCharacterSet!) -> CFCharacterSet!
```

## Parameters

- `alloc`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `theSet`: The character set from which to create an inverted set.

## Return Value

Return Value A new character set that is the invert of theSet. Ownership follows the The Create Rule.

## See Also

### Creating Character Sets

- [CFCharacterSetCreateCopy(_:_:)](corefoundation/cfcharactersetcreatecopy(_:_:).md)
- [CFCharacterSetCreateWithCharactersInRange(_:_:)](corefoundation/cfcharactersetcreatewithcharactersinrange(_:_:).md)
- [CFCharacterSetCreateWithCharactersInString(_:_:)](corefoundation/cfcharactersetcreatewithcharactersinstring(_:_:).md)
- [CFCharacterSetCreateWithBitmapRepresentation(_:_:)](corefoundation/cfcharactersetcreatewithbitmaprepresentation(_:_:).md)
