ABNF.Util
Miscelaneous utilities.
Summary↑
normalize_rule_name(rule) | Normalices a rule name giving by a char list or a string, by downcase’ing it and replacing “-“ with a “_” |
to_num(char_list, base \\ 10) | Transforms a char list or a string into a number in the given base |
Functions
Specs:
Normalices a rule name giving by a char list or a string, by downcase’ing it and replacing “-“ with a “_”.
Examples:
iex> ABNF.Util.normalize_rule_name 'Arule-NaME'
"arule_name"
Transforms a char list or a string into a number in the given base.
Examples:
iex> ABNF.Util.to_num '10'
10
iex> ABNF.Util.to_num "10", 16
16