fn to_ascii_char(n: &u8) -> Option<char> {
    // TODO In Rust v1.52.0 or later, use `char::from_digit`:
    // https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
    //
    //     char::from_digit(*n as u32 + 10, 36)
    //
    // In that call, radix 36 is used because the characters in radix
    // 36 are [0-9a-z]. We want to exclude the the first ten of those
    // characters, so we add 10 to the number before conversion.
    //
    // Until that function is available, just add `n` to `b'a'` and
    // cast to `char`.
    if *n < 26 {
        Some((b'a' + n) as char)
    } else {
        None
    }
}
/// Convert a number between 0 and 25 into a lowercase ASCII character.
///
/// # Examples
///
/// ```rust,ignore
/// use crate::filenames::to_ascii_char;
///
/// assert_eq!(to_ascii_char(&0), Some('a'));
/// assert_eq!(to_ascii_char(&25), Some('z'));
/// assert_eq!(to_ascii_char(&26), None);
/// ```
Convert a number between 0 and 25 into a lowercase ASCII character.
Convert a number between 0 and 25 into a lowercase ASCII character .
fn to_ascii_char(n: &u8) -> Option<char> {
    // TODO In Rust v1.52.0 or later, use `char::from_digit`:
    // https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
    //
    //     char::from_digit(*n as u32 + 10, 36)
    //
    // In that call, radix 36 is used because the characters in radix
    // 36 are [0-9a-z]. We want to exclude the the first ten of those
    // characters, so we add 10 to the number before conversion.
    //
    // Until that function is available, just add `n` to `b'a'` and
    // cast to `char`.
    if *n < 26 {
        Some((b'a' + n) as char)
    } else {
        None
    }
}
fn to_ascii_char ( n : & u8 ) -> Option < char > { // TODO In Rust v1.52.0 or later, use `char::from_digit`: // https://doc.rust-lang.org/std/primitive.char.html#method.from_digit // //     char::from_digit(*n as u32 + 10, 36) // // In that call, radix 36 is used because the characters in radix // 36 are [0-9a-z]. We want to exclude the the first ten of those // characters, so we add 10 to the number before conversion. // // Until that function is available, just add `n` to `b'a'` and // cast to `char`. if * n < 26 { Some ( ( b'a' + n ) as char ) } else { None } }
Convert a number between 0 and 25 into a lowercase ASCII character.
Convert a number between 0 and 25 into a lowercase ASCII character .
n
&u8
n
&u8
examples
```rust,ignore
use crate::filenames::to_ascii_char.


` ` ` rust ignore use crate :: filenames :: to_ascii_char .