Skip to content

Commit

Permalink
Merge pull request #62 from LuizZak/avoid_characters_count
Browse files Browse the repository at this point in the history
Use NSString’s length instead of String.CharacterView.count, since we…
  • Loading branch information
Robert Gummesson authored Mar 31, 2017
2 parents 9e9c974 + ca76d58 commit c942323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BuildTimeAnalyzer/LogProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extension LogProcessorProtocol {
remainingRange = nextRange.upperBound..<remainingRange.upperBound
}

let range = NSMakeRange(0, text.characters.count)
let range = NSMakeRange(0, (text as NSString).length)
guard let match = regex.firstMatch(in: text, options: [], range: range) else { continue }

let timeString = text.substring(to: text.characters.index(text.startIndex, offsetBy: match.range.length - 4))
Expand Down

0 comments on commit c942323

Please sign in to comment.