mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00: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
|
|
}
|
|
|
|
}
|