Macro cssparser::match_ignore_ascii_case
[−]
[src]
macro_rules! match_ignore_ascii_case { ( $input:expr, $( $match_body:tt )* ) => { ... }; }
Expands to a match
expression with string patterns,
matching case-insensitively in the ASCII range.
The patterns must not contain ASCII upper case letters. (They must be already be lower-cased.)
Example
#[macro_use] extern crate cssparser; match_ignore_ascii_case! { &function_name, "rgb" => parse_rgb(..), "rgba" => parse_rgba(..), "hsl" => parse_hsl(..), "hsla" => parse_hsla(..), _ => Err(format!("unknown function: {}", function_name)) }