A set of Unicode character values for use in search operations.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Framework
- Foundation
Declaration
struct CharacterSet
Overview
A Character
represents a set of Unicode-compliant characters. Foundation types use Character
to group characters together for searching operations, so that they can find any of a particular set of characters during a search.
This type provides “copy-on-write” behavior, and is also bridged to the Objective-C NSCharacter
class.