Parse srcset attribute

This commit is contained in:
Neha 2017-09-29 10:31:11 +00:00 committed by Josh Matthews
parent 77afc3f33a
commit 1f1ca3ac8d
4 changed files with 280 additions and 2 deletions

View file

@ -58,7 +58,8 @@ pub fn split_commas<'a>(s: &'a str) -> Filter<Split<'a, char>, fn(&&str) -> bool
s.split(',').filter(not_empty as fn(&&str) -> bool)
}
fn is_ascii_digit(c: &char) -> bool {
/// Character is ascii digit
pub fn is_ascii_digit(c: &char) -> bool {
match *c {
'0'...'9' => true,
_ => false,