Function voca_rs::manipulate::repeat

source ·
pub fn repeat(subject: &str, times: usize) -> String
Expand description

Repeats the subject number of times.

Arguments

  • subject - The string to repeat.
  • times - The number of times to repeat.

Example

use voca_rs::*;
manipulate::repeat("w", 3);
// => "www"
manipulate::repeat("world", 0);
// => ""
use voca_rs::Voca;
"w"._repeat(3);
// => "www"