-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathNSTextCheckingResult.swift
48 lines (36 loc) · 2.01 KB
/
NSTextCheckingResult.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
/* NSTextCheckingType in this project is limited to regular expressions. */
public struct NSTextCheckingType : OptionSetType {
public let rawValue: UInt64
public init(rawValue: UInt64) { self.rawValue = rawValue }
public static let RegularExpression = NSTextCheckingType(rawValue: 1 << 10) // regular expression matches
}
public class NSTextCheckingResult : NSObject, NSCopying, NSCoding {
public class func regularExpressionCheckingResultWithRanges(ranges: NSRangePointer, count: Int, regularExpression: NSRegularExpression) -> NSTextCheckingResult { NSUnimplemented() }
public required init?(coder aDecoder: NSCoder) {
NSUnimplemented()
}
public func encodeWithCoder(aCoder: NSCoder) {
NSUnimplemented()
}
public func copyWithZone(zone: NSZone) -> AnyObject {
NSUnimplemented()
}
/* Mandatory properties, used with all types of results. */
public var resultType: NSTextCheckingType { NSUnimplemented() }
public var range: NSRange { NSUnimplemented() }
}
extension NSTextCheckingResult {
/*@NSCopying*/ public var regularExpression: NSRegularExpression? { NSUnimplemented() }
/* A result must have at least one range, but may optionally have more (for example, to represent regular expression capture groups). The range at index 0 always matches the range property. Additional ranges, if any, will have indexes from 1 to numberOfRanges-1. */
public var numberOfRanges: Int { NSUnimplemented() }
public func rangeAtIndex(idx: Int) -> NSRange { NSUnimplemented() }
public func resultByAdjustingRangesWithOffset(offset: Int) -> NSTextCheckingResult { NSUnimplemented() }
}