blob: aa55bd856abf38f254480252f216525538832db9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
pub fn strip_irrelevant_content(s: &str) -> String {
let mut retn = "";
match s.find(r#"<div class=profile id=profile>"#) {
Some(pos) => retn = &s[pos..],
None => (),
};
match s.find(r#"<INPUT style="font-size: 2em;" TYPE=SUBMIT NAME="votes" VALUE="Cast Votes">"#) {
Some(pos) => retn = &s[..pos],
None => (),
};
return retn.into();
}
|