Skip to main content

whitespace_equal

Function whitespace_equal 

Source
pub fn whitespace_equal(a: &str, b: &str) -> bool
Expand description

Whether two strings are the same once all their white space is taken out: music21’s whitespaceEqual.

use music21::common::stringtools::whitespace_equal;

assert!(whitespace_equal("    hello \n there ", "hello there"));
assert!(!whitespace_equal("    hello \n there ", " bye there "));