13 #include <fmt/format.h> 15 #include <restinio/string_view.hpp> 16 #include <restinio/exception.hpp> 38 (
'0' <= c && c <=
'9' ) ||
39 (
'a' <= c && c <=
'z' ) ||
40 (
'A' <= c && c <=
'Z' ) ||
62 (
'0' <= c && c <=
'9' ) ||
63 (
'a' <= c && c <=
'z' ) ||
64 (
'A' <= c && c <=
'Z' ) ||
80 (
'0' <= c && c <=
'9' ) ||
81 (
'a' <= c && c <=
'f' ) ||
82 (
'A' <= c && c <=
'F' );
90 if(
'0' <= c1 && c1 <=
'9' )
95 result = 10 + c1 -
'a';
100 if(
'0' <= c2 && c2 <=
'9' )
105 result += 10 + c2 -
'a';
178 "invalid non-escaped char with code {:#02X} at pos: {}",
194 "invalid escape sequence at pos {}",
d -
data.
data() ) };
206 const char *
d =
data;
230 "invalid non-escaped char with code {:#02X} at pos: {}",
247 "invalid escape sequence at pos {}",
d -
data ) };
static constexpr bool ordinary_char(char c) noexcept
string_view_t from_string< string_view_t >(string_view_t s)
Get a value from string_view.
std::size_t inplace_unescape_percent_encoding(char *data, std::size_t size)
The traits for escaping and unexcaping symbols in JavaScript-compatible mode.
The default traits for escaping and unexcaping symbols in a query string.
std::string unescape_percent_encoding(const string_view_t data)
char extract_escaped_char(char c1, char c2)
std::string escape_percent_encoding(const string_view_t data)
Percent encoding.
static constexpr bool ordinary_char(char c) noexcept
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...