|
template<typename T > |
static constexpr T | int_from_char (char c) noexcept |
|
template<typename T > |
static constexpr char | char_from_int (T x) noexcept |
|
template<typename ItIn , typename ItOut > |
static constexpr void | encode (ItIn ptr, ItIn last, ItOut output) |
| Encode bytes into a string.
|
|
template<typename ItIn > |
static std::string | encode (ItIn first, ItIn last) noexcept |
| Encode bytes into a string.
|
|
static constexpr std::string | encode (std::span< std::byte const > bytes) noexcept |
| Encode bytes into a string.
|
|
template<typename ItIn , typename ItOut > |
static constexpr ItIn | decode (ItIn ptr, ItIn last, ItOut output) |
| Decodes a UTF-8 string into bytes.
|
|
static bstring | decode (std::string_view str) |
|
|
static constexpr detail::base_n_alphabet | alphabet = Alphabet |
|
static constexpr char | padding_char = alphabet.padding_char |
|
static constexpr long long | radix = alphabet.radix |
|
static constexpr long long | bytes_per_block = BytesPerBlock |
|
static constexpr long long | chars_per_block = CharsPerBlock |
|
◆ decode()
template<typename ItIn , typename ItOut >
static constexpr ItIn v1::base_n< Alphabet, CharsPerBlock, BytesPerBlock >::decode |
( |
ItIn | ptr, |
|
|
ItIn | last, |
|
|
ItOut | output ) |
|
inlinestaticconstexpr |
Decodes a UTF-8 string into bytes.
- Parameters
-
ptr | An iterator inside a UTF-8 string to the start of a base-n encoded data. |
last | An iterator beyond the encoded data. |
output | An output iterator to a std::byte buffer. |
- Returns
- An iterator pointing on the first invalid character or last.
◆ encode() [1/3]
template<typename ItIn >
static std::string v1::base_n< Alphabet, CharsPerBlock, BytesPerBlock >::encode |
( |
ItIn | first, |
|
|
ItIn | last ) |
|
inlinestaticnoexcept |
Encode bytes into a string.
- Parameters
-
first | An iterator pointing to the first byte to encode. |
last | An iterator pointing to one beyond the last byte to encode. |
- Returns
- The data encoded as a string.
◆ encode() [2/3]
template<typename ItIn , typename ItOut >
static constexpr void v1::base_n< Alphabet, CharsPerBlock, BytesPerBlock >::encode |
( |
ItIn | ptr, |
|
|
ItIn | last, |
|
|
ItOut | output ) |
|
inlinestaticconstexpr |
Encode bytes into a string.
- Parameters
-
ptr | Pointer |
last | Beyond the last byte. |
output | |
◆ encode() [3/3]
static constexpr std::string v1::base_n< Alphabet, CharsPerBlock, BytesPerBlock >::encode |
( |
std::span< std::byte const > | bytes | ) |
|
|
inlinestaticconstexprnoexcept |
Encode bytes into a string.
- Parameters
-
bytes | A span of bytes to encode. |
- Returns
- The data encoded as a string.
The documentation for this class was generated from the following file: