Skip to main content

loose_attribute_names

Function loose_attribute_names 

pub fn loose_attribute_names(raw: &str) -> Vec<String>
Expand description

The name of every attribute in raw, read loosely: after each run of @s outside strings and groups, whitespace is skipped, the text up to the next (, whitespace, @ or quote is taken, everything in it but letters, digits and _ is dropped, and the rest is lower-cased. A default-ignorable character is dropped even when it counts as a letter (the Hangul filler U+3164 does). @ Deny (x) gives deny, and so do @@de\u{200B}ny(x) (a zero-width space) and @@de-ny(x): an invisible or punctuation character inside the name must not turn a policy into an unknown, inert attribute. For re-checking that no attribute a reader would take for a policy was skipped, whatever its spelling.