restinio::utils::impl Namespace Reference

## Namespaces

namespace | bitops

## Classes

struct | safe_uint64_to_size_t
struct | safe_uint64_to_size_t< false >
struct | safe_uint64_to_size_t< true >

## Functions

std::size_t | uint64_to_size_t (std::uint64_t v)
| Helper function for truncating uint64 to std::size_t with exception if that truncation will lead to data loss. More...
bool | is_hexdigit (char c)
char | 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 > | do_unescape_percent_encoding (const string_view_t data, Chars_Collector &&collector)
| The actual implementation of unescape-percent-encoding procedure. More...

## Function Documentation

## do_unescape_percent_encoding()

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.

Since
  v.0.6.5

Definition at line 239 of file percent_encoding.hpp.

## extract_escaped_char()

char restinio::utils::impl::extract_escaped_char | ( | char | c1,
|  | char | c2
| ) |  |

inline

Definition at line 199 of file percent_encoding.hpp.

## is_hexdigit()

bool restinio::utils::impl::is_hexdigit | ( | char | c | ) |

inline

Definition at line 190 of file percent_encoding.hpp.

## uint64_to_size_t()

std::size_t restinio::utils::impl::uint64_to_size_t | ( | std::uint64_t | v | ) |

inline

Helper function for truncating uint64 to std::size_t with exception if that truncation will lead to data loss.

A check of v is performed only if std::size_t has less capacity than std::uint64_t (for example on 32-bit systems).

Exceptions

  std::runtime_error | if the value of v can't truncated to std::size_t without loss of data.

Since
  v.0.4.1

Definition at line 59 of file safe_uint_truncate.hpp.