String.repeat

Syntax

PP.String.repeat(pattern: String, count: Number, sep: String);

Parameters

pattern. Pattern to repeat.

count. Number of repetitions.

sep. Separator between repeating substrings. An optional parameter; by default an empty string is substituted.

Description

The repeat method repeats a string desired number of times, adding a separator between repeating substrings if necessary.

Comments

This method returns a String-type value.

Example

The example of use is given in the with description of the String.getRandom method.

See also:

PP