Commit 08ca5304 authored by Drew's avatar Drew

Add length property for matches

parent da38c969
......@@ -178,6 +178,11 @@ public struct Match : CustomStringConvertible, CustomDebugStringConvertible {
public let start : Int
/// The end of the match (utf8 encoding)
public let end : Int
/// The length in UTF8 bytes of the match
public var length: Int {
return end - start
}
///The string we searched to generate this match
public let underlyingString : String
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment