REPLICATE( ) Function

Returns a character string that contains a specified character expression repeated a specified number of times.

REPLICATE(cExpression, nTimes)

Return Values

Character

Parameters

  • cExpression
    Specifies the character expression that is replicated.
  • nTimes
    Specifies the number of times the character expression is replicated.

Remarks

In Visual FoxPro, the maximum length of the resulting character string is restricted by the amount of available memory.

Example

CLEAR
? REPLICATE('HELLO ',4) && Displays HELLO HELLO HELLO HELLO

See Also

SPACE( ) | Creating Character Expressions | CLEAR Commands