We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feca84c commit a30032cCopy full SHA for a30032c
src/main.rs
@@ -8,14 +8,14 @@ fn main() {
8
eprintln!("Usage: {} <pinyin>", args[0]);
9
std::process::exit(1);
10
}
11
+ let han_re = regex::Regex::new(r"\p{Han}").unwrap();
12
13
let input: &str = &args[1];
14
+ if han_re.is_match(input) {return};
15
let matcher = PinyinMatcher::builder(input)
16
.pinyin_notations(PinyinNotation::Ascii | PinyinNotation::AsciiFirstLetter)
17
.build();
18
- let han_re = regex::Regex::new(r"\p{Han}").unwrap();
-
19
let stdin = std::io::stdin();
20
let reader = BufReader::new(stdin.lock());
21
for line_result in reader.lines() {
0 commit comments