// String.swift import Foundation extension String { public var expandingTildeInPath: String { return NSString(string: self).expandingTildeInPath } func toURL() -> URL? { return hasPrefix("https://") ? URL(string: self) : URL(string: "https://\(self)") } }