Parse HTMLInputElement attributes

This commit is contained in:
Keith Yeung 2016-04-12 09:38:25 -04:00
parent e18bf81905
commit c93ed39f33
4 changed files with 44 additions and 132 deletions

View file

@ -41,6 +41,10 @@ pub fn split_html_space_chars<'a>(s: &'a str) ->
s.split(HTML_SPACE_CHARACTERS).filter(not_empty as fn(&&str) -> bool)
}
pub fn split_commas<'a>(s: &'a str) -> Filter<Split<'a, char>, fn(&&str) -> bool> {
fn not_empty(&split: &&str) -> bool { !split.is_empty() }
s.split(',').filter(not_empty as fn(&&str) -> bool)
}
fn is_ascii_digit(c: &char) -> bool {
match *c {