1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use crate::types::*;
pub const ALPHABET: &[&[&str]] = &[
&["a","A"],
&["b","B"],
&["c","C"],
&["d","D"],
&["e","E"],
&["f","F"],
&["g","G"],
&["h","H"],
&["i","I"],
&["j","J"],
&["k","K"],
&["l","L"],
&["m","M"],
&["n","N"],
&["o","O"],
&["p","P"],
&["q","Q"],
&["r","R"],
&["s","S"],
&["t","T"],
&["u","U"],
&["v","V"],
&["w","W"],
&["x","X"],
&["y","Y"],
&["z","Z"],
&[".",","],
];
pub fn get_test_alphabet() -> (Alphabet,CharIndexType) {
let mut alphabet: Alphabet = Vec::new();
for chars in ALPHABET {
let mut ownedchars: Vec<String> = Vec::new();
for c in *chars {
ownedchars.push(c.to_string());
}
alphabet.push(ownedchars);
}
let l = alphabet.len();
(alphabet, l as CharIndexType)
}