function for inverse relative path?

Timothee Cour thelastmammoth at gmail.com
Thu Dec 7 01:36:04 UTC 2017


what would be a robust way to do this `inverseRelativePath`, and
should that be in std.path?

```
auto a="/a/b/c.d";
auto b="b/c.d";
assert(inverseRelativePath(a, b) == "/a");
assertThrown(inverseRelativePath(a, "c2.d"));
```


More information about the Digitalmars-d mailing list