mirror of
https://github.com/mas-cli/mas
synced 2024-12-23 10:23:15 +00:00
17 lines
350 B
Swift
17 lines
350 B
Swift
|
//
|
||
|
// String+PercentEncoding.swift
|
||
|
// MasKit
|
||
|
//
|
||
|
// Created by Ben Chatelain on 1/5/19.
|
||
|
// Copyright © 2019 mas-cli. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
public extension String {
|
||
|
/// Return an URL encoded string
|
||
|
var URLEncodedString: String? {
|
||
|
return addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
|
||
|
}
|
||
|
}
|