tangled
alpha
login
or
join now
bwc9876.dev
/
bingus-bot
0
fork
atom
The world's most clever kitty cat
0
fork
atom
overview
issues
pulls
pipelines
Split by unicode whitespace instead of ASCII
bwc9876.dev
1 day ago
529ae19f
0e7f6601
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+2
-2
1 changed file
expand all
collapse all
unified
split
src
brain.rs
+2
-2
src/brain.rs
···
85
85
}
86
86
87
87
fn parse(msg: &str) -> impl Iterator<Item = Token> {
88
88
-
msg.split_ascii_whitespace()
88
88
+
msg.split_whitespace()
89
89
.filter_map(|w| {
90
90
// Filter out pings, they can get annoying
91
91
if w.starts_with("<@") && w.ends_with(">") {
···
105
105
}
106
106
107
107
fn extract_final_word(msg: &str) -> Option<String> {
108
108
-
msg.split_ascii_whitespace()
108
108
+
msg.split_whitespace()
109
109
.last()
110
110
.and_then(Self::normalize_token)
111
111
}