fn check_pattern(output: String, pattern: Vec<&str>) {
    let mut i = 0;
    for w in output.split_whitespace() {
        if pattern[i] == "" {
            assert!(w.parse::<i32>().is_ok());
        } else {
            assert_eq!(pattern[i], w);
        }
        i += 1;
    }
}
// Check split string and vector match, numbers are replaced with "" in vec
Check split string and vector match, numbers are replaced with "" in vec
Check split string and vector match numbers are replaced with " " in vec
fn check_pattern(output: String, pattern: Vec<&str>) {
    let mut i = 0;
    for w in output.split_whitespace() {
        if pattern[i] == "" {
            assert!(w.parse::<i32>().is_ok());
        } else {
            assert_eq!(pattern[i], w);
        }
        i += 1;
    }
}
fn check_pattern ( output : String , pattern : Vec < & str > ) { let mut i = 0 ; for w in output . split_whitespace ( ) { if pattern [ i ] == " " { assert ! ( w parse i32 ( ) is_ok ( ) ) ; } else { assert_eq ! ( pattern [ i ] w ) ; } i += 1 ; } }
Check split string and vector match, numbers are replaced with "" in vec
Check split string and vector match numbers are replaced with " " in vec
output
String
pattern
Vec<&str>
output
String
pattern
Vec<&str>