summaryrefslogtreecommitdiff
path: root/src/uri.hh
blob: 6b926940bb264079b2c7d69e731a7ec7a5d7643c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef URI_HH
#define URI_HH

#include <optional>
#include <string>
#include <string_view>

namespace uri {

// If input needs no decoding, input is returned. Otherwise dst
// is modified and returned. If invalid encoding is found, nullopt is returned.
std::optional<std::string_view> decode(std::string_view input,
                                       std::string& dst);

}  // namespace uri

#endif  // URI_HH