MatchData
public struct MatchData
Including all the necessary infomation when using Regex
-
A match
Declaration
Swift
public let match: String
-
A range for the match
Declaration
Swift
public let range: NSRange
-
The array of captures
Declaration
Swift
public let captures: [String]
-
The array of all captures ranges
Declaration
Swift
public let ranges: [NSRange]
-
Returns the number of elements in the match array.
Declaration
Swift
public var size: Int
-
Returns the array of matches.
Declaration
Swift
public var to_a: [String]
-
Returns the entire matched string.
Declaration
Swift
public var to_s: String
-
Undocumented
Declaration
Swift
public struct MatchData
-
The hash value.
Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution.
Declaration
Swift
public var hashValue: Int
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
public static func ==(lhs: MatchData, rhs: MatchData) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.