Add upload, preview sheet
This commit is contained in:
@ -17,10 +17,29 @@ extension String {
|
||||
}
|
||||
|
||||
var withLeadingSlashRemoved: String {
|
||||
if !hasPrefix("/") {
|
||||
return self
|
||||
hasPrefix("/") ? String(dropFirst("/".count)) : self
|
||||
}
|
||||
|
||||
var withLeadingSlash: String {
|
||||
hasPrefix("/") ? self : "/" + self
|
||||
}
|
||||
|
||||
var withTrailingSlashRemoved: String {
|
||||
hasSuffix("/") ? String(dropLast("/".count)) : self
|
||||
}
|
||||
|
||||
var withTrailingSlash: String {
|
||||
hasSuffix("/") ? self : self + "/"
|
||||
}
|
||||
|
||||
var withHttpPrefixRemoved: String {
|
||||
if hasPrefix("https://") {
|
||||
return String(dropFirst("https://".count))
|
||||
}
|
||||
return String(dropFirst("/".count))
|
||||
if hasPrefix("http://") {
|
||||
return String(dropFirst("http://".count))
|
||||
}
|
||||
return self
|
||||
}
|
||||
|
||||
var removingSurroundingQuotes: String {
|
||||
|
Reference in New Issue
Block a user