RosettaCodeData/Task/Repeat-a-string/Rust/repeat-a-string-1.rust

2 lines
73 B
Text
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
std::iter::repeat("ha").take(5).collect::<String>(); // ==> "hahahahaha"