     fileprivate init(sexagesimal value: String) {
         self = value.sexagesimal()
     }
+#if swift(>=4.0)
+    fileprivate init(sexagesimal value: Substring) {
+        self = value.sexagesimal()
+    }
+#endif
 }
 
 extension Double: SexagesimalConvertible {}
 extension Int: SexagesimalConvertible {
+#if swift(>=4.0)
+    fileprivate init?(_ value: Substring) {
+        self.init(value, radix: 10)
+    }
+#else
     fileprivate init?(_ value: String) {
         self.init(value, radix: 10)
     }
+#endif
 }
 
 fileprivate extension String {

}

fileprivate extension String {
    func substring(with range: NSRange) -> String? {
        guard range.location != NSNotFound else { return nil }
        let utf16lowerBound = utf16.index(utf16.startIndex, offsetBy: range.location)

//  Created by Norio Nomura on 12/21/16.
//  Copyright (c) 2016 Yams. All rights reserved.
//

// swiftlint:disable file_length

import Foundation

