#include <algorithm>
#include <iterator>
#include <limits>
#include <string_view>
Go to the source code of this file.
|
class | Base64 |
| Encodes and decodes byte streams using base64. More...
|
|
|
consteval char | lut_idx (std::string_view lut, char c) |
| Performs a reverse look-up. More...
|
|
consteval auto | gen_rlut (std::string_view lut) |
| Creates an array that contains the position of every byte in lut . More...
|
|
◆ gen_rlut()
consteval auto gen_rlut |
( |
std::string_view |
lut | ) |
|
Creates an array that contains the position of every byte in lut
.
- Returns
- An array
a
such that:
a[c] == 0
if c
is not found in a
or is =
lut[a[c]] == c
otherwise
◆ lut_idx()
consteval char lut_idx |
( |
std::string_view |
lut, |
|
|
char |
c |
|
) |
| |
Performs a reverse look-up.
- Parameters
-
lut | Look-up table. |
c | Character whose position in lut is returned. |
- Returns
- The position of
c
or lut.size()
if not found.