montjet
montjet

Reputation: 645

How to combine two relative URIs into one in C++

I have one base URI like https://stackoverflow.com/questions/ask and a relative URI. I want to combine them all into one absolute URI.

Examples:

How can I do this?

Upvotes: 0

Views: 220

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 12527

It seems the proposal to add URI-handling to standard C++, https://isocpp.org/files/papers/n3975.html, is dead and/or stuck in committee.

You therefore have to write your own or use a 3rd party - e.g., Qt has QUrl with https://doc.qt.io/qt-5/qurl.html#resolved

QUrl QUrl::resolved(const QUrl &relative) const 

Upvotes: 2

Related Questions