def inside
import ezx@1.11.0.0/src/pkg/pkg.bend as Pkgimport Base
725# a path of the project, as it is written inside a package rooted at `root`:
726# the path itself under the project's own root, and the path with the root's
727# directories taken off otherwise. The hub serves a package's files at these
728# paths, so `ez add` and `ez publish` both name the entry by it.
729def inside(+root: String, +path: String) -> String:
730 Bool.pick(String, String.eq(root, "."), path,
731 String.drop(path, (String.length(root) + 1n : Nat)))