-
-
Save philippkeller/73ea01dd02e178a9e3b16ae492cd81f1 to your computer and use it in GitHub Desktop.
Rust code shared from the playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// merges an array with ordinal numbers into a string | |
extern crate itertools; | |
use itertools::Itertools; | |
fn join_int_slice(slice:&[u8]) -> String { | |
slice.iter().map(|&a| a as char).join("") | |
} | |
fn main() { | |
let a = [70,90,80]; | |
println!("{}", join_int_slice(&a)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment