Skip to main content

hex_numbers

Function hex_numbers 

Source
pub fn hex_numbers(text: &str) -> String
Expand description

The text with every run of decimal digits written in upper-case hexadecimal after 0x, which is how HexEnum turns an IntEnum’s repr into its own. Runs of any length are converted.

use music21::common::enums::hex_numbers;

assert_eq!(
    hex_numbers("<ChannelVoiceMessages.NOTE_ON: 144>"),
    "<ChannelVoiceMessages.NOTE_ON: 0x90>"
);