Rept function

Syntax

Rept(str, reps)

Description

Use the Rept function to replicate a text string a specified number of times and combine the result into a single string.

Parameters

Parameter Description

str

A String value to be replicated.

reps

A Number value specifying how many times to replicate str. If reps is 0, Rept returns an empty string. If reps is not a whole integer, it is truncated.

Returns

Returns a String value equal to str repeated reps times.

Example

This example sets &SOMESTARS to "**********".

&SOMESTARS = Rept("*",10);