decode.hpp 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
  3. // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // Official repository: https://github.com/boostorg/url
  9. //
  10. #ifndef BOOST_URL_DETAIL_DECODE_HPP
  11. #define BOOST_URL_DETAIL_DECODE_HPP
  12. #include <boost/url/encoding_opts.hpp>
  13. #include <boost/core/detail/string_view.hpp>
  14. #include <cstdlib>
  15. namespace boost {
  16. namespace urls {
  17. namespace detail {
  18. BOOST_URL_DECL
  19. char
  20. decode_one(
  21. char const* it) noexcept;
  22. BOOST_URL_DECL
  23. std::size_t
  24. decode_bytes_unsafe(
  25. core::string_view s) noexcept;
  26. BOOST_URL_DECL
  27. std::size_t
  28. decode_unsafe(
  29. char* dest,
  30. char const* end,
  31. core::string_view s,
  32. encoding_opts opt = {}) noexcept;
  33. } // detail
  34. } // urls
  35. } // boost
  36. #endif