splash/Sources/Splash/Extensions/CharacterSet/CharacterSet+Contains.swift
2018-08-24 18:42:07 +02:00

18 lines
335 B
Swift

/**
* Splash
* Copyright (c) John Sundell 2018
* MIT license - see LICENSE.md
*/
import Foundation
internal extension CharacterSet {
func contains(_ character: Character) -> Bool {
guard let scalar = character.unicodeScalars.first else {
return false
}
return contains(scalar)
}
}