mas/MasKit/Extensions/String+PercentEncoding.swift
2021-03-28 14:21:37 -07:00

16 lines
343 B
Swift

//
// String+PercentEncoding.swift
// MasKit
//
// Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
extension String {
/// Return an URL encoded string
public var URLEncodedString: String? {
addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
}
}