dandy 0.1.10

Implementation of DFAs, NFAs and regular expressions together with a file format
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::collections::HashSet;
use std::rc::Rc;

#[inline]
pub fn alphabet_equal(a: &[Rc<str>], b: &[Rc<str>]) -> bool {
    if a.len() != b.len() {
        return false;
    }

    let set1 = a.iter().collect::<HashSet<_>>();
    let set2 = b.iter().collect::<HashSet<_>>();
    set1 == set2
}