HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
v1::detail::base_n_alphabet Struct Reference

Public Member Functions

template<std::size_t StringLength>
constexpr base_n_alphabet (char const (&str)[StringLength], bool case_insensitive=StringLength<=33, char padding_char='\0') noexcept
 Construct an alphabet.
 
constexpr char char_from_int (int8_t x) const noexcept
 Get a character from an integer.
 
constexpr int8_t int_from_char (char c) const noexcept
 

Data Fields

long long radix
 
bool case_insensitive
 
char padding_char
 
std::array< int8_t, 256 > int_from_char_table = {}
 
std::array< char, 127 > char_from_int_table = {}
 

Constructor & Destructor Documentation

◆ base_n_alphabet()

template<std::size_t StringLength>
constexpr v1::detail::base_n_alphabet::base_n_alphabet ( char const (&) str[StringLength],
bool case_insensitive = StringLength <= 33,
char padding_char = '\0' )
inlineconstexprnoexcept

Construct an alphabet.

Parameters
strA null terminated string as a char array.
case_insensitiveThe alphabet is case insensitive for decoding.
padding_charThe character used to complete the last block during encoding.

Member Function Documentation

◆ char_from_int()

constexpr char v1::detail::base_n_alphabet::char_from_int ( int8_t x) const
inlineconstexprnoexcept

Get a character from an integer.

The integer must be in range of 0 to modula (exclusive).


The documentation for this struct was generated from the following file: