Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Reviewed-on: #1
19 lines
306 B
Swift
19 lines
306 B
Swift
//
|
|
// StringExtensions.swift
|
|
//
|
|
//
|
|
// Created by Thibaut Schmitt on 31/08/2022.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension String {
|
|
|
|
func prependIfRelativePath(_ prependPath: String) -> String {
|
|
if self.hasPrefix("/") {
|
|
return self
|
|
}
|
|
return prependPath + self
|
|
}
|
|
}
|