swc_css_ast

Macro matches_eq_ignore_ascii_case

source
macro_rules! matches_eq_ignore_ascii_case {
    ($value:expr, $($pat:expr),*) => { ... };
}
Expand description

Returns true if the given value matches one of the given patterns.

The type of value and patterns should be identical.

ยงExamples

use swc_atoms::Atom;
use swc_atoms::js_word;
use swc_css_ast::*;

assert!(matches_eq_ignore_ascii_case!(Atom::from("A"), "a"));
assert!(matches_eq_ignore_ascii_case!("A", "a"));