Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

Repeat the given string exactly n times

// Repeat the given string exactly n times
fn repeat_str(src: &str, count: usize) -> String {
  vec![src; count].join("")
}
 
PREVIOUS NEXT
Tagged: #Repeat #string #times
ADD COMMENT
Topic
Name
8+2 =