[−][src]Function display_utils::repeat
pub fn repeat<T: Display>(token: T, times: usize) -> impl Display
Repeat an object a certain number of times.
Equivalent to str::repeat
.
assert_eq!(repeat("fun", 5).to_string(), "funfunfunfunfun"); assert_eq!(repeat(7, 7).to_string(), "7777777");