Files
resgen.swift/Sources/ResgenSwift/Generate/Extensions/StringExtensions.swift
Thibaut Schmitt e9bc779da6
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Add --project-directory option to generate command to easily use relative path
2022-08-31 16:42:22 +02:00

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
}
}