mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 00:58:04 +03:00
11 lines
260 B
Swift
11 lines
260 B
Swift
import Foundation
|
|
|
|
public extension NSRegularExpression {
|
|
|
|
func isMatch(to string: String) -> Bool {
|
|
let range = NSRange(location: 0, length: string.utf16.count)
|
|
return self.firstMatch(in: string, options: [], range: range) != nil
|
|
}
|
|
|
|
}
|