Commit e5f3a7a2 by Julio Hermosa

Se agrega la función para editar las URLs de las imágenes

parent 9d76d329
...@@ -129,12 +129,20 @@ extension String{ ...@@ -129,12 +129,20 @@ extension String{
} }
return month return month
} }
// func convertURL()->String{ func convertURL()->String{
// var newURL = self let url = self
// let subStr:Substring = "_th" let subStr:Substring = "_th"
// let start = url.index(url.startIndex, offsetBy: 0)
// return newURL let end = url.index(url.endIndex, offsetBy: -4)
// } let range = start..<end
let string = String(url[range])
let startExt = url.index(url.endIndex, offsetBy: -4)
let endExt = url.index(url.endIndex, offsetBy: 0)
let rangeExt = startExt..<endExt
let ext = String(url[rangeExt])
let returnValue = string + subStr + ext
return returnValue
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment