Previous Topic: STRING-LENGTHNext Topic: SUBSTRING


STRING-REPEAT

Purpose

Returns the string that results from repeating a string value a specified number of times.

Syntax

►►─┬─ STRING-REPEAT ─┬─ ( stringrepetitions ) ──────────────────────────────►◄
   └─ SREPeat ───────┘

Parameters

string

Specifies the string value that is repeated.

String can be:

repetitions

Specifies the numeric value representing the number of times that the string value is to be repeated.

Repetitions can be:

Example

In the following example, the repeat function is used to repeat the constant 'NAME' two times:

Statement:
    MOVE SREPEAT('NAME',2) TO WK-TARGET.
Returned string:
    'NAMENAMENAME'