Skip to content

str::path::relative

relative(basePath: String, entirePath: String)

ParameterTypeDescription
basePathString
entirePathString

Returns

(String) A relative version of 'entirePath' without the base path

Example

elk
str::path::relative("/a/b", "a/b/c") #=> "c"
str::path::relative("/a/b", "a/b/c") #=> "c"