arg_router
1.4.0
C++ command line argument parsing and routing
|
Namespaces | |
code_point | |
no_break_rules | |
Classes | |
class | iterator |
class | line_iterator |
Enumerations | |
enum class | grapheme_cluster_break_class : std::uint8_t |
enum class | line_break_class : std::uint8_t |
Functions | |
std::size_t | levenshtein_distance (std::string_view a, std::string_view b) |
template<typename Node > | |
vector< parsing::token_type > | closest_matching_child_node (const Node &node, parsing::token_type token) |
constexpr std::size_t | count (std::string_view str) noexcept |
constexpr bool | is_whitespace (std::string_view str) noexcept |
constexpr bool | contains_whitespace (std::string_view str) noexcept |
constexpr std::size_t | terminal_width (std::string_view str) noexcept |
Variables | |
constexpr auto | double_width_table |
constexpr auto | grapheme_cluster_break_table |
constexpr auto | line_break_table |
constexpr auto | whitespace_table |
constexpr auto | zero_width_table |
Namespace for UTF-8 encoded string functions.
|
strong |
Grapheme cluster break classes, and their values in the encoded code points in grapheme_cluster_break_table.
Do not change the order or value as they need to match scripts/unicode_table_generators.py.
Definition at line 18 of file grapheme_cluster_break.hpp.
|
strong |
Line break classes, and their values in the encoded code points in line_break_table.
Do not change the order or value as they need to match scripts/unicode_table_generators.py.
Definition at line 15 of file line_break.hpp.
vector<parsing::token_type> arg_router::utility::utf8::closest_matching_child_node | ( | const Node & | node, |
parsing::token_type | token | ||
) |
Uses the Levenshtein distance algorithm to find the closest matching child node to the given token, and it's parents (if any).
Node | Parent node type |
node | Parent node instance |
token | Token being queried, the prefix type is considered during the distance calculation |
Definition at line 70 of file levenshtein_distance.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
Calculates the Levenshtein distance between a and b.
Levenshtein distance gives a measure of similarity between two strings.
a | First string |
b | Second string |
Definition at line 22 of file levenshtein_distance.hpp.
|
inlineconstexprnoexcept |
Returns the terminal width (i.e. number columns) required by str.
This is equivalent to https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c, but constexpr.
str | Input string |
|
constexpr |
Double-width code points i.e. those that occupy 2 terminal columns when rendered.
Each entry is an inclusive range of code points.
This table is generated using scripts/unicode_table_generators.py from http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt v14.0.0.
Definition at line 18 of file double_width.hpp.
|
constexpr |
Grapheme cluster break class table.
Each entry is an inclusive range of code points, with each range's break class value encoded as metadata.
This table is generated using scripts/unicode_table_generators.py from https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt v14.0.0 and https://www.unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt v14.0.0
Definition at line 244 of file grapheme_cluster_break.hpp.
|
constexpr |
Line break class table.
Each entry is an inclusive range of code points, with each range's break class value encoded as metadata.
This table is generated using scripts/unicode_table_generators.py from https://www.unicode.org/Public/UCD/latest/ucd/LineBreak.txt v14.0.0
Definition at line 700 of file line_break.hpp.
|
constexpr |
Whitespace code points.
Each entry is an inclusive range of code points.
This table is generated using scripts/unicode_table_generators.py from http://www.unicode.org/Public/UNIDATA/PropList.txt v14.0.0.
Definition at line 18 of file whitespace.hpp.
|
constexpr |
Zero-width code points i.e. those that occupy 0 terminal columns when rendered.
Each entry is an inclusive range of code points.
This table is generated using scripts/unicode_table_generators.py from http://www.unicode.org/Public/UNIDATA/extracted/DerivedGeneralCategory.txt v14.0.0.
Definition at line 18 of file zero_width.hpp.