summaryrefslogtreecommitdiff
path: root/src/uri.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/uri.hh')
-rw-r--r--src/uri.hh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/uri.hh b/src/uri.hh
new file mode 100644
index 0000000..6b92694
--- /dev/null
+++ b/src/uri.hh
@@ -0,0 +1,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