From a2e15e303425ff623f85399f0286801843291072 Mon Sep 17 00:00:00 2001 From: Avinash Dongarwar Date: Mon, 20 Nov 2017 11:49:31 -0800 Subject: [PATCH] Removing String's deprecated APIs and modifying for Swift 4 --- Sources/PathKit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PathKit.swift b/Sources/PathKit.swift index 3aa9124..bb32531 100644 --- a/Sources/PathKit.swift +++ b/Sources/PathKit.swift @@ -42,7 +42,7 @@ public struct Path { path = "." } else if components.first == Path.separator && components.count > 1 { let p = components.joined(separator: Path.separator) - path = p.substring(from: p.characters.index(after: p.startIndex)) + path = String (p[p.index(after: p.startIndex)...]) } else { path = components.joined(separator: Path.separator) }