Files
XcodeGen/Sources/ProjectSpec/NSRegularExpressionExtensions.swift
T
Beniamin 0ad02b7e26 Add ability to set an order of groups (#613)
Co-authored-by: Beniamin Sarkisyan <bsarkisyan@projectx019.com>
2020-04-28 10:32:10 -05:00

11 lines
268 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
}
}