Skip to main content

divider_text

Function divider_text 

Source
pub fn divider_text(comment: &str) -> String
Available on crate feature musicxml only.
Expand description

The text of the comment music21’s addDividerComment writes: the comment centred in signs that pad it out to sixty characters.

use music21::musicxml::divider_text;

assert_eq!(divider_text("Part 1"), format!("{} Part 1 {}", "=".repeat(27), "=".repeat(27)));