Rust补0以及截取字符串 let s = "12345698745632178965423"; let m = format!("{:0<16}", s); println!("{}", &m[0..16]);