Skip to main content

svg_attr_value

Function svg_attr_value 

Source
pub fn svg_attr_value<'a>(tag: &'a str, name: &str) -> Option<&'a str>
Expand description

Value of the name="…" / name='…' attribute in an XML start tag.

The attribute name is matched whole: a bare substring search reads stroke-width="2" — legal on a root <svg> — as width, which is how a 634×805 drawing once measured 2×805.