Crates.io | alphabet-macro |
lib.rs | alphabet-macro |
version | 0.1.2 |
source | src |
created_at | 2020-09-05 13:16:30.26761 |
updated_at | 2020-09-05 17:16:54.088091 |
description | Provides a macro that can be used to easily create const alphabets. |
homepage | |
repository | https://gitlab.com/FloorIsJava/alphabet-macro |
max_upload_size | |
id | 285102 |
size | 7,639 |
A Rust crate for easy alphabet creation. Documentation is available on docs.rs.
Add this to your Cargo.toml
:
[dependencies]
alphabet-macro = "0.1"
use alphabet_macro::alphabet;
alphabet!(HEX = "0123456789abcdef");
assert_eq!(HEX.len(), 16);
assert_eq!(HEX[5], '5');
assert_eq!(HEX[10], 'a');
This crate is published under the terms of the MIT license. See the LICENSE file for details.