[][src]Macro alphabet::alphabet

alphabet!() { /* proc-macro */ }

Declares a constant alphabet. You can choose any valid identifier as the name for the alphabet.

The general syntax looks like alphabet!(<name> = "<contents>").

Examples

use alphabet_macro::alphabet;

alphabet!(BINARY  = "01");
alphabet!(ENGLISH = "abcdefghijklmnopqrstuvwxyz");
alphabet!(GERMAN  = "aäbcdefghijklmnoöpqrstuüvwxyzß");
alphabet!(HEBREW  = "אבגדהוזחטיכלמנסעפצקרשת");

assert_eq!(BINARY.len(), 2);
assert_eq!(ENGLISH.len(), 26);
assert_eq!(GERMAN.len(), 30);
assert_eq!(HEBREW.len(), 22);