March Docs

PathUtil

Small string-path helpers shared by Build and Assets. These deliberately avoid the stdlib Path.dirname/Path.extension/Path.strip_extension helpers, which crash at runtime on a Some(0) literal pattern; until that stdlib bug is fixed we compute the pieces directly here.

All functions BORROW their String arguments (they only read + concatenate) and return freshly-allocated results, so callers can use the inputs again.

Functions

fnparent_dirparent_dir(path : String) : String#
fnrel_underrel_under(root : String, path : String) : String#
fnstrip_trailing_slashstrip_trailing_slash(s : String) : String#