fn num_prefix_fixed_width(i: usize, width: usize) -> Option<String> {
    let max = 10_usize.pow(width as u32);
    if i >= max {
        None
    } else {
        Some(format!("{i:0width$}", i = i, width = width))
    }
}
/// Fixed width numeric string representation of index `i`.
///
/// If `i` is greater than or equal to the number of numbers that can
/// be represented in the given `width`, then this function returns
/// `None`.
///
/// # Examples
///
/// ```rust,ignore
/// use crate::filenames::num_prefix_fixed_width;
///
/// assert_eq!(num_prefix_fixed_width(0, 2).as_deref(), "89");
/// assert_eq!(num_prefix_fixed_width(99, 2).as_deref(), "9000");
/// assert_eq!(num_prefix_fixed_width(100, 2), None);
/// ```
Fixed width numeric string representation of index `i`.
Fixed width numeric string representation of index ` i ` .
fn num_prefix_fixed_width(i: usize, width: usize) -> Option<String> {
    let max = 10_usize.pow(width as u32);
    if i >= max {
        None
    } else {
        Some(format!("{i:0width$}", i = i, width = width))
    }
}
fn num_prefix_fixed_width ( i : usize , width : usize ) -> Option < String > { let max = 10_usize . pow ( width as u32 ) ; if i >= max { None } else { Some ( format ! ( " " i i width width ) ) } }
Fixed width numeric string representation of index `i`.
Fixed width numeric string representation of index ` i ` .
i
usize
width
usize
i
usize
width
usize
examples
```rust,ignore
use crate::filenames::num_prefix_fixed_width.


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