pub fn remove_all_similar_states(&mut self, pattern: &str) {
        while let Some(pos) = self.states.iter().position(|x| x.contains(pattern)) {
            self.states.remove(pos);
            self.dirty = true;
        }
    }
/// Removes all states with a similar name compared to the given pattern.
Removes all states with a similar name compared to the given pattern.
Removes all states with a similar name compared to the given pattern .
pub fn remove_all_similar_states(&mut self, pattern: &str) {
        while let Some(pos) = self.states.iter().position(|x| x.contains(pattern)) {
            self.states.remove(pos);
            self.dirty = true;
        }
    }
pub fn remove_all_similar_states ( & mut self , pattern : & str ) { while let Some ( pos ) = self . states . iter ( ) . position ( | x | x . contains ( pattern ) ) { self . states . remove ( pos ) ; self . dirty = true ; } }
Removes all states with a similar name compared to the given pattern.
Removes all states with a similar name compared to the given pattern .
&mut self
pattern
&str