isSuperset
TypeScriptisSuperset(other: CharacterSet): booleanSwift declarationfunc isSuperset(of other: CharacterSet) -> BoolReturns true if `self` is a superset of `other`.
struct · iOS 8.0+ · SDK 27.1
struct CharacterSetA set of Unicode character values for use in search operations. A `CharacterSet` represents a set of Unicode-compliant characters. Foundation types use `CharacterSet` 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 `NSCharacterSet` class.
isSuperset(other: CharacterSet): booleanSwift declarationfunc isSuperset(of other: CharacterSet) -> BoolReturns true if `self` is a superset of `other`.
get description(): stringSwift declarationvar description: String { get }A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.
subtracting(other: CharacterSet): CharacterSetSwift declarationfunc subtracting(_ other: CharacterSet) -> CharacterSetReturns a `CharacterSet` created by removing elements in `other` from `self`.
static get whitespaces(): CharacterSetSwift declarationstatic var whitespaces: CharacterSet { get }Returns a character set containing the characters in Unicode General Category Zs and `CHARACTER TABULATION (U+0009)`.
static initCharactersIn(range: SDKHandle): CharacterSetSwift declarationinit(charactersIn range: ClosedRange<Unicode.Scalar>)Initialize with a closed range of integers. It is the caller's responsibility to ensure that the values represent valid `Unicode.Scalar` values, if that is what is desired.
static initCharactersIn55101(string: string): CharacterSetSwift declarationinit(charactersIn string: String)Initialize with the characters in the given string. - parameter string: The string content to inspect for characters.
static initCharactersIn97330(range: SDKHandle): CharacterSetSwift declarationinit(charactersIn range: Range<Unicode.Scalar>)Initialize with a range of integers. It is the caller's responsibility to ensure that the values represent valid `Unicode.Scalar` values, if that is what is desired.
intersection(other: CharacterSet): CharacterSetSwift declarationfunc intersection(_ other: CharacterSet) -> CharacterSetReturns an intersection of the `CharacterSet` with another `CharacterSet`.
static get alphanumerics(): CharacterSetSwift declarationstatic var alphanumerics: CharacterSet { get }Returns a character set containing the characters in Unicode General Categories L*, M*, and N*.
static get decimalDigits(): CharacterSetSwift declarationstatic var decimalDigits: CharacterSet { get }Returns a character set containing the characters in the category of Decimal Numbers.
static get decomposables(): CharacterSetSwift declarationstatic var decomposables: CharacterSet { get }Returns a character set containing individual Unicode characters that can also be represented as composed character sequences (such as for letters with accents), by the definition of "standard decomposition" in version 3.2 of the Unicode character encoding standard.
static initContentsOfFile(file: string): (CharacterSet) | nullSwift declarationinit?(contentsOfFile file: String)Initialize with the contents of a file. Returns `nil` if there was an error reading the file. - parameter file: The file to read.
static get urlHostAllowed(): CharacterSetSwift declarationstatic var urlHostAllowed: CharacterSet { get }Returns the character set for characters allowed in a host URL subcomponent.
static get urlPathAllowed(): CharacterSetSwift declarationstatic var urlPathAllowed: CharacterSet { get }Returns the character set for characters allowed in a path URL component.
static get urlUserAllowed(): CharacterSetSwift declarationstatic var urlUserAllowed: CharacterSet { get }Returns the character set for characters allowed in a user URL subcomponent.
static get urlQueryAllowed(): CharacterSetSwift declarationstatic var urlQueryAllowed: CharacterSet { get }Returns the character set for characters allowed in a query URL component.
get debugDescription(): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
formIntersection(other: CharacterSet): voidSwift declarationmutating func formIntersection(_ other: CharacterSet)Sets the value to an intersection of the `CharacterSet` with another `CharacterSet`.
static get lowercaseLetters(): CharacterSetSwift declarationstatic var lowercaseLetters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category Ll.
static get uppercaseLetters(): CharacterSetSwift declarationstatic var uppercaseLetters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category Lu and Lt.
static get controlCharacters(): CharacterSetSwift declarationstatic var controlCharacters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category Cc and Cf.
static get illegalCharacters(): CharacterSetSwift declarationstatic var illegalCharacters: CharacterSet { get }Returns a character set containing values in the category of Non-Characters or that have not yet been defined in version 3.2 of the Unicode standard.
static get nonBaseCharacters(): CharacterSetSwift declarationstatic var nonBaseCharacters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category M*.
static get capitalizedLetters(): CharacterSetSwift declarationstatic var capitalizedLetters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category Lt.
static get urlFragmentAllowed(): CharacterSetSwift declarationstatic var urlFragmentAllowed: CharacterSet { get }Returns the character set for characters allowed in a fragment URL component.
static get urlPasswordAllowed(): CharacterSetSwift declarationstatic var urlPasswordAllowed: CharacterSet { get }Returns the character set for characters allowed in a password URL subcomponent.
symmetricDifference(other: CharacterSet): CharacterSetSwift declarationfunc symmetricDifference(_ other: CharacterSet) -> CharacterSetReturns an exclusive or of the `CharacterSet` with another `CharacterSet`.
get bitmapRepresentation(): ArrayBufferSwift declaration@nonobjc var bitmapRepresentation: Data { get }Returns a representation of the `CharacterSet` in binary format.
static initBitmapRepresentation(data: ArrayBuffer): CharacterSetSwift declarationinit(bitmapRepresentation data: Data)Initialize with a bitmap representation. This method is useful for creating a character set object with data from a file or other external data source. - parameter data: The bitmap representation.
static get punctuationCharacters(): CharacterSetSwift declarationstatic var punctuationCharacters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category P*.
static get whitespacesAndNewlines(): CharacterSetSwift declarationstatic var whitespacesAndNewlines: CharacterSet { get }Returns a character set containing characters in Unicode General Category Z*, `U+000A ~ U+000D`, and `U+0085`.
formSymmetricDifference(other: CharacterSet): voidSwift declarationmutating func formSymmetricDifference(_ other: CharacterSet)Sets the value to an exclusive or of the `CharacterSet` with another `CharacterSet`.
union(other: CharacterSet): CharacterSetSwift declarationfunc union(_ other: CharacterSet) -> CharacterSetReturns a union of the `CharacterSet` with another `CharacterSet`.
insertCharactersIn(range: SDKHandle): voidSwift declarationmutating func insert(charactersIn range: ClosedRange<Unicode.Scalar>)Insert a closed range of integer values in the `CharacterSet`. It is the caller's responsibility to ensure that the values represent valid `Unicode.Scalar` values, if that is what is desired.
insertCharactersIn17955(string: string): voidSwift declarationmutating func insert(charactersIn string: String)Insert the values from the specified string into the `CharacterSet`.
insertCharactersIn41656(range: SDKHandle): voidSwift declarationmutating func insert(charactersIn range: Range<Unicode.Scalar>)Insert a range of integer values in the `CharacterSet`. It is the caller's responsibility to ensure that the values represent valid `Unicode.Scalar` values, if that is what is desired.
insert(character: SDKHandle): { "inserted": boolean; "memberAfterInsert": SDKHandle }Swift declaration@discardableResult mutating func insert(_ character: Unicode.Scalar) -> (inserted: Bool, memberAfterInsert: Unicode.Scalar)Insert a `Unicode.Scalar` representation of a character into the `CharacterSet`. `Unicode.Scalar` values are available on `Swift.String.UnicodeScalarView`.
invert(): voidSwift declarationmutating func invert()Invert the contents of the `CharacterSet`.
removeCharactersIn(range: SDKHandle): voidSwift declarationmutating func remove(charactersIn range: ClosedRange<Unicode.Scalar>)Remove a closed range of integer values from the `CharacterSet`.
removeCharactersIn81754(string: string): voidSwift declarationmutating func remove(charactersIn string: String)Remove the values from the specified string from the `CharacterSet`.
removeCharactersIn83469(range: SDKHandle): voidSwift declarationmutating func remove(charactersIn range: Range<Unicode.Scalar>)Remove a range of integer values from the `CharacterSet`.
remove(character: SDKHandle): (SDKHandle) | nullSwift declaration@discardableResult mutating func remove(_ character: Unicode.Scalar) -> Unicode.Scalar?Remove a `Unicode.Scalar` representation of a character from the `CharacterSet`. `Unicode.Scalar` values are available on `Swift.String.UnicodeScalarView`.
update(character: SDKHandle): (SDKHandle) | nullSwift declaration@discardableResult mutating func update(with character: Unicode.Scalar) -> Unicode.Scalar?Insert a `Unicode.Scalar` representation of a character into the `CharacterSet`. `Unicode.Scalar` values are available on `Swift.String.UnicodeScalarView`.
static get letters(): CharacterSetSwift declarationstatic var letters: CharacterSet { get }Returns a character set containing the characters in Unicode General Category L* & M*.
static get symbols(): CharacterSetSwift declarationstatic var symbols: CharacterSet { get }Returns a character set containing the characters in Unicode General Category S*.
contains(member: SDKHandle): booleanSwift declarationfunc contains(_ member: Unicode.Scalar) -> BoolTest for membership of a particular `Unicode.Scalar` in the `CharacterSet`.
get inverted(): CharacterSetSwift declaration@nonobjc var inverted: CharacterSet { get }Returns an inverted copy of the receiver.
static get newlines(): CharacterSetSwift declarationstatic var newlines: CharacterSet { get }Returns a character set containing the newline characters (`U+000A ~ U+000D`, `U+0085`, `U+2028`, and `U+2029`).
subtract(other: CharacterSet): voidSwift declarationmutating func subtract(_ other: CharacterSet)Sets the value to a `CharacterSet` created by removing elements in `other` from `self`.
formUnion(other: CharacterSet): voidSwift declarationmutating func formUnion(_ other: CharacterSet)Sets the value to a union of the `CharacterSet` with another `CharacterSet`.
hasMember(plane: number): booleanSwift declarationfunc hasMember(inPlane plane: UInt8) -> BoolReturns true if the `CharacterSet` has a member in the specified plane. This method makes it easier to find the plane containing the members of the current character set. The Basic Multilingual Plane (BMP) is plane 0.
static init(): CharacterSetSwift declarationinit()Initialize an empty instance.
No declarations were skipped in this snapshot.