Skip to content

Commit

Permalink
Merge pull request #67 from turushan/swift4
Browse files Browse the repository at this point in the history
Resolve "'characters' is deprecated" warning for Swift 4.
  • Loading branch information
JohnSundell committed Sep 29, 2018
2 parents d0acd59 + 5d5bfb4 commit 29ba064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension Process {

extension String {
var nonEmpty: String? {
guard characters.count > 0 else {
guard count > 0 else {
return nil
}

Expand All @@ -65,7 +65,7 @@ extension String {
return self
}

let startIndex = index(endIndex, offsetBy: -suffix.characters.count)
let startIndex = index(endIndex, offsetBy: -suffix.count)
return replacingCharacters(in: startIndex..<endIndex, with: "")
}
}
Expand Down

0 comments on commit 29ba064

Please sign in to comment.