Skip to main content

axis_matches

Function axis_matches 

Source
pub fn axis_matches(quantities: &[String], value: &str) -> bool
Expand description

Whether a value names one of an axis’s quantities, ignoring case: music21’s axisMatchesValue.

use music21::graph::find::axis_matches;

let quantities = ["count".to_string(), "counting".to_string()];
assert!(axis_matches(&quantities, "Counting"));
assert!(!axis_matches(&quantities, "offset"));