docx-rs 0.4.18

A .docx file writer with Rust/WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use xml::attribute::OwnedAttribute;

pub fn is_false(v: &str) -> bool {
    v == "0" || v == "false"
}

pub fn read_bool(attrs: &[OwnedAttribute]) -> bool {
    if let Some(v) = attrs.first() {
        if is_false(&v.value) {
            return false;
        }
    }
    true
}