session-ios/SignalServiceKit/src/Util/NSRegularExpression+SSK.swift

15 lines
324 B
Swift
Raw Normal View History

2019-01-10 19:21:33 +01:00
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@objc
public extension NSRegularExpression {
@objc
public func hasMatch(input: String) -> Bool {
return self.firstMatch(in: input, options: [], range: NSRange(location: 0, length: input.utf16.count)) != nil
}
}