RESTinio
Classes | Namespaces | Functions
percent_encoding.hpp File Reference
#include <string>
#include <restinio/impl/include_fmtlib.hpp>
#include <restinio/string_view.hpp>
#include <restinio/exception.hpp>
#include <restinio/expected.hpp>
#include <restinio/utils/utf8_checker.hpp>

Go to the source code of this file.

Classes

struct  restinio::utils::restinio_default_unescape_traits
 The default traits for escaping and unexcaping symbols in a query string. More...
 
struct  restinio::utils::x_www_form_urlencoded_unescape_traits
 Traits for escaping and unexcaping symbols in a query string in correspondence with application/x-www-form-urlencoded rules. More...
 
struct  restinio::utils::relaxed_unescape_traits
 Traits for escaping and unescaping symbols in a query string in very relaxed mode. More...
 
struct  restinio::utils::javascript_compatible_unescape_traits
 The traits for escaping and unexcaping symbols in JavaScript-compatible mode. More...
 
struct  restinio::utils::unescape_percent_encoding_success_t
 Type that indicates that unescaping of percent-encoded symbols completed successfully. More...
 
class  restinio::utils::unescape_percent_encoding_failure_t
 Type that indicates a failure of unescaping of percent-encoded symbols. More...
 

Namespaces

namespace  restinio
 
namespace  restinio::utils
 
namespace  restinio::utils::impl
 
namespace  restinio::utils::uri_normalization
 
namespace  restinio::utils::uri_normalization::unreserved_chars
 
namespace  restinio::utils::uri_normalization::unreserved_chars::impl
 

Functions

bool restinio::utils::impl::is_hexdigit (char c)
 
char restinio::utils::impl::extract_escaped_char (char c1, char c2)
 
template<typename Traits , typename Chars_Collector >
RESTINIO_NODISCARD expected_t< unescape_percent_encoding_success_t, unescape_percent_encoding_failure_t > restinio::utils::impl::do_unescape_percent_encoding (const string_view_t data, Chars_Collector &&collector)
 The actual implementation of unescape-percent-encoding procedure. More...
 
RESTINIO_NODISCARD constexpr bool restinio::utils::uri_normalization::unreserved_chars::impl::is_unreserved_char (const char ch) noexcept
 Is this symbol a part of unreserved set? More...
 
template<typename One_Byte_Handler , typename Three_Byte_Handler >
void restinio::utils::uri_normalization::unreserved_chars::impl::run_normalization_algo (string_view_t what, One_Byte_Handler &&one_byte_handler, Three_Byte_Handler &&three_byte_handler)
 Internal helper to perform the main logic of enumeration of symbols in URI. More...
 
RESTINIO_NODISCARD std::size_t restinio::utils::uri_normalization::unreserved_chars::estimate_required_capacity (string_view_t what)
 Calculate the size of a buffer to hold normalized value of a URI. More...
 
void restinio::utils::uri_normalization::unreserved_chars::normalize_to (string_view_t what, char *dest)
 Perform normalization of URI value. More...
 
template<typename Traits = restinio_default_unescape_traits>
RESTINIO_NODISCARD std::string restinio::utils::escape_percent_encoding (const string_view_t data)
 Percent encoding. More...
 
template<typename Traits = restinio_default_unescape_traits>
RESTINIO_NODISCARD std::string restinio::utils::unescape_percent_encoding (const string_view_t data)
 
template<typename Traits = restinio_default_unescape_traits>
RESTINIO_NODISCARD expected_t< std::string, unescape_percent_encoding_failure_t > restinio::utils::try_unescape_percent_encoding (const string_view_t data)
 Helper function for unescaping percent-encoded string. More...
 
template<typename Traits = restinio_default_unescape_traits>
RESTINIO_NODISCARD std::size_t restinio::utils::inplace_unescape_percent_encoding (char *data, std::size_t size)
 
template<typename Traits = restinio_default_unescape_traits>
RESTINIO_NODISCARD expected_t< std::size_t, unescape_percent_encoding_failure_t > restinio::utils::try_inplace_unescape_percent_encoding (char *data, std::size_t size)
 Helper function for unescaping percent-encoded string inplace. More...