我想将单个字符与一系列字符(不止一个)进行匹配。目前,我正在尝试使用..
运算符的方法。
match input_token {
'Z'..'a' => { // I want to match any character from 'a' -> 'z' and 'A' -> 'Z' inclusive
... run some code
}
}
在 Rust 的 match 表达式/语句的单个分支中,是否可以匹配多个值?
我想将单个字符与一系列字符(不止一个)进行匹配。目前,我正在尝试使用..
运算符的方法。
match input_token {
'Z'..'a' => { // I want to match any character from 'a' -> 'z' and 'A' -> 'Z' inclusive
... run some code
}
}
在 Rust 的 match 表达式/语句的单个分支中,是否可以匹配多个值?