Skip to content

Commit

Permalink
Added String to URL extension!
Browse files Browse the repository at this point in the history
  • Loading branch information
taichi-dm committed Nov 6, 2021
1 parent 8062e8c commit c4124af
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/Arimaxtension/Extensions/String/ToURL.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// File.swift
//
//
// Created by Taichi Arima on 2021/11/07.
//

import Foundation


public extension String {

// Usage: let url = "https://www.apple.com/".url!
// from: https://qiita.com/tattn/items/ff50e575bc149ecb8e80
var url: URL? {
URL(string: self)
}
}

0 comments on commit c4124af

Please sign in to comment.