jampack 1.0.0

Lightweight, asynchronous and extensible asset framework made for use in games and apps.
Documentation
1
2
3
4
5
6
7
8
9
10
/// Converts a u8 to a 3-digit string, used for hashing
pub fn u8_to_string(x: u8) -> String {
    let base = x.to_string();
    match base.len() {
        1 => format!("00{}", base),
        2 => format!("0{}", base),
        3 => base,
        _ => String::new(),
    }
}