pub fn name(&self) -> Option<String> {
        let mut name = String::with_capacity(16);

        for i in 0..16 {
            let c =
                match self.rom[offsets::TITLE + i].to_ascii() {
                    Ok(c) => c,
                    _     => return None,
                };

            // If the name is shorter than 16bytes it's padded with 0s
            if c.as_byte() == 0 {
                break;
            }

            // Only uppercase ASCII is valid, but let's be a little
            // more lenient
            if !c.is_print() {
                return None;
            }

            // Append new character
            name.push(c.as_char());
        }

        Some(name)
    }
/// Attempt to retreive the rom's name
Attempt to retreive the rom's name
Attempt to retreive the rom ' s name
pub fn name(&self) -> Option<String> {
        let mut name = String::with_capacity(16);
        for i in 0..16 {
            let c =
                match self.rom[offsets::TITLE + i].to_ascii() {
                    Ok(c) => c,
                    _     => return None,
                };
            // If the name is shorter than 16bytes it's padded with 0s
            if c.as_byte() == 0 {
                break;
            }
            // Only uppercase ASCII is valid, but let's be a little
            // more lenient
            if !c.is_print() {
                return None;
            }
            // Append new character
            name.push(c.as_char());
        }
        Some(name)
    }
pub fn name ( & self ) -> Option < String > { let mut name = String :: with_capacity ( 16 ) ; for i in 0 .. 16 { let c = match self . rom [ offsets :: TITLE + i ] . to_ascii ( ) { Ok ( c ) => c , _ => return None , } ; // If the name is shorter than 16bytes it's padded with 0s if c . as_byte ( ) == 0 { break ; } // Only uppercase ASCII is valid, but let's be a little // more lenient if ! c . is_print ( ) { return None ; } // Append new character name . push ( c . as_char ( ) ) ; } Some ( name ) }
Attempt to retreive the rom's name
Attempt to retreive the rom ' s name
&self
&self