The “set” part of
CharacterSet
refers not toSet
from the Swift standard library, but instead to theSetAlgebra
protocol, which bestows the type with the same interface:contains(_:)
,insert(_:)
,union(_:)
,intersection(_:)
, and so on. CharacterSet - NSHipster