Skip to content

Commit

Permalink
Merge pull request #57 from wspl/master
Browse files Browse the repository at this point in the history
  • Loading branch information
sharplet committed Jul 28, 2017
2 parents 1867f0a + 974a3b8 commit 7e0553a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Foundation+Ranges.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

#if os(Linux)
#if !swift(>=3.2) && os(Linux)
typealias NSTextCheckingResult = TextCheckingResult
#endif

Expand Down
4 changes: 2 additions & 2 deletions Source/MatchResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private final class _MatchResult {

private func utf16Range(from range: NSRange) -> Range<String.UTF16Index>? {
guard range.location != NSNotFound else { return nil }
let start = string.startIndex.advanced(by: range.location)
let end = start.advanced(by: range.length)
let start = string.index(string.startIndex, offsetBy: range.location)
let end = string.index(start, offsetBy: range.length)
return start..<end
}

Expand Down

0 comments on commit 7e0553a

Please sign in to comment.