1

Is there an open source library that, given ...

/a/b/c
/a/b/c/d/e

would return ../..

or for that matter given

/a/b/c/d
/a/b/c/e

would return ../d

?

0

1 Answer 1

4

If you don't mind passing by converting your Strings into URI then this latter one has the method relativize which should do exactly what you want, take a look here.

Sign up to request clarification or add additional context in comments.

1 Comment

That is a truly devious idea for which I applaud you.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.